Can my favourite team still become Football Champion? As a fan of an at most moderately successful footballBE team, towards the end of the season I often wonder whether my favourite team still has any theoretical chance left of becoming champion. Your task in this challenge is to answer that question for me.

Input

You will recieve three inputs: the current table, the list of remaining matches, and the current position of the team we are interested in.

Input 1: The current table, a sequence of numbers were the i-th number are the points gained by team i so far. For example, the input
[93, 86, 78, 76, 75] encodes the following table (only the last column is of importance):

Input 2: The remaining matches, a sequence of tuples where each tuple (i,j) stands for a remaining match between team i and j. In the above example, a second input of [(1,2), (4,3), (2,3), (3,2), (1,2)] would mean that the remaining matches are:

Chelsea vs Tottenham, Liverpool vs Man. City, Tottenham vs Man. City, Man. City vs Tottenham, Chelsea vs Tottenham

Input 3: The current position of the team we are interested in. For example, an input of 2 for the above example would mean that we'd like to know whether Tottenham can still become champion.

Output

For each remaining match of the form (i,j), there are three possible outcomes:

Team i wins: Team i gets 3 points, team j gets 0 points
Team j wins: Team i gets 0 points, team j gets 3 points
Draw: Team i and j both get 1 point

You must output a truthy value if there is some outcome for all remaining games such that at the end, no other team has more points than the team specified in the 3rd input. Otherwise, output a falsy value.

Example: Consider the exemplary input from the above section:

Input 1 = [93, 86, 78, 76, 75],
Input 2 = [(1,2), (4,3), (2,3), (3,2), (1,2)],
Input 3 = 2

If team 2 wins all its remaining matches (i.e. (1,2), (2,3), (3,2), (1,2)), it gets 4*3 = 12 additional points; none of the other teams gets any points from these matches. Let's say the other remaining match (i.e. (4,3)) is a draw. Then the final scores would be:

 Team 1: 93, Team 2: 86 + 12 = 98, Team 3: 78 + 1 = 79, Team 4: 76 + 1 = 77, Team 5: 75

This means that we have already found some outcome for the remaining matches such that no other team has more points than team 2, so the output for this input must be truthy.

Details

You may assume the first input to be an ordered sequence, i.e. for i < j, the i-th entry is equal to or greater than the j-th entry. The first input may be taken as a list, a string or the like.
You may take the second input as a string, a list of tuples or the like. Alternatively, you may take it as a two-dimensional array a where a[i][j] is the number of entries of the form (i,j) in the list of remaining matches. For example, a[1][2] = 2, a[2][3] = 1, a[3][2] = 1, a[4][3] = 1
corresponds to [(1,2), (4,3), (2,3), (3,2), (1,2)].
For the second and third input, you may assume 0-indexing instead of 1-indexing.
You may take the three inputs in any order.

Please specify the exact input format you chose in your answer.

Side node: The problem underlying this challenge was shown to be NP-complete in "Football Elimination is Hard to Decide Under the 3-Point-Rule". Interestingly, if only two points are awarded for a win, the problem becomes solvable in polynomial time.

Test Cases

All test cases are in the format Input1, Input2, Input3.

Truthy:

[93, 86, 78, 76, 75], [(1,2), (4,3), (2,3), (3,2), (1,2)], 2
[50], [], 1
[10, 10, 10], [], 3
[15, 10, 8], [(2,3), (1,3), (1,3), (3,1), (2,1)], 2

Falsy:

[10, 9, 8], [], 2
[10, 9, 9], [(2,3), (3,2)], 1
[21, 12, 11], [(2,1), (1,2), (2,3), (1,3), (1,3), (3,1), (3,1)], 2

Winner

This is code-golf, so the shortest correct answer (in bytes) wins. The winner will be chosen one week after the first correct answer is posted.

Haskell (Lambdabot), 84 bytes

Thanks to @bartavelle for saving me a byte.

Without Lambdabot, add 20 bytes for import Control.Lens plus a newline.

The function takes its arguments in the same order as described in the OP, 0-indexed. Its second argument (the list of remaining matchups) is a flat list of indexes (e.g. [1,2,4,1] corresponds to [(Team 1 vs Team 2), (Team 4 vs Team 1)]).

The rules are a little vague as to whether or not this is allowed. If it isn't allowed, the function can take input in the format provided by the examples – a list of tuples. In that case, add 2 bytes to this solution's score, due to replacing a:b:r with (a,b):r.

(!)=(+~).element
(t?(a:b:r))s=any(t?r)[a!3$s,b!3$s,b!1$a!1$s]
(t?_)s=s!!t==maximum s

Explanation:

The first line defines an infix function ! of three variables, of type (!) :: Int -> Int -> [Int] -> [Int], which increments the value at a given index in a list. Since, oftentimes, code is easier to understand than words (and since Haskell syntax can be weird), here's a Python translation:

def add(index, amount, items):
    items[index] += amount
    return items

The second line defines another infix function ?, also of three variables (the challenge input). I'll rewrite it more readably here:

(t ? a:b:r) s = any (t ? r) [a ! 3 $ s, b ! 3 $ s, (b ! 1 $ a) ! 1 $ s]
(t ? _) s = (s !! t) == maximum s

This is a recursive implementation of exhaustive search. It recurs over the list of remaining games, branching on the three possible outcomes, and then, once the list is empty, checking whether or not our team has the maximum number of points. Again in (non-idiomatic) Python, this is:

def can_still_win(standings, games_left, our_team):
    if games_left == []:
        return standings[our_team] == max(standings)
    team1, team2, other_games = games_left[0], games_left[1], games_left[2:]
    team1Wins, team2Wins, tie = standings.copy(), standings.copy(), standings.copy()
    team1Wins[team1] += 3
    team2Wins[team2] += 3
    tie[team1] += 1
    tie[team2] += 1
    return (can_still_win(team1Wins, other_games, our_team)
            or can_still_win(team2Wins, other_games, our_team)
            or can_still_win(tie, other_games, our_team))

Try it online!

*Sadly, TiO doesn't support Lens, so this link won't actually run.


Can this list be balanced? To check whether a list of non-negative integers is balanced, one can imagine putting respective weights on a board and then try to balance the board on a pivot such that the summarized relative weights left and right of the pivot are the same. The relative weight is given by multiplying the weight with its distance to the pivot (see law of the lever).

(Source: wikipedia)

This image corresponds to a list [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5]. This list is balanced because the 5 has a distance of 20 to the pivot, the 100 a distance of 1 and 5*20 = 100 = 100*1.

Examples

 3 1 5 7
#########
     ^

In this case the pivot is directly under the 5, the 3 has distance 2 and the 1 and 7 have distance 1. So both sides left and right of the pivot sum up to 7 (3*2 + 1*1 on the left and 7*1 on the right) and therefore the list [3, 1, 5, 7] is balanced.

Note, however, that the pivot does not have to be placed under one of the list elements, but might also be placed in-between two list elements:

 6 3 1
#######
  ^

In this case the distances become 0.5, 1.5, 2.5, ... and so on. This list is also balanced because 6*0.5 = 3 = 3*0.5 + 1*1.5.

The pivot can only be placed exactly below one number or exactly in the middle between two numbers, and not e.g. at two-thirds between two numbers.

Task

Given a list of non-negative integers in any reasonable format, output a truthy value if the list can be balanced and a falsy value otherwise.

You can assume that the input list contains at least two elements and that at least one element is non-zero.

This is a code-golf challenge, so the answer with the fewest amount of bytes in each language wins.

Truthy Testcases

[1, 0]
[3, 1, 5, 7]
[6, 3, 1]
[100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5]
[10, 4, 3, 0, 2, 0, 5]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[7, 7, 7, 7]

Falsy Testcases

[1, 2]
[3, 6, 5, 1, 12]
[0, 0, 2, 0, 1, 0]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[6, 3, 2, 4, 0, 1, 2, 3]
[4, 0, 0, 2, 3, 5, 2, 0, 1, 2, 3, 0, 0, 1, 2, 4, 3, 1, 3, 0, 0, 2]
[100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5]

A lot of related challenges where found while this challenge was sand-boxed:
Is it a balanced number?, Equilibrium index of a sequence, Balance a set of weights on a seesaw, Balancing Words, Will I tip over? and Where does the pivot belong?

Pyth, 12 10 bytes

!%ys*VQUQs

Try it online

Saved 2 bytes thanks to Mr. Xcoder and Erik the Outgolfer.

Explanation

!%ys*VQUQs
    *VQUQ    Multiply each input by its index.
  ys         Take twice the sum (to handle half-integer positions).
!%       sQ  Check if that's a multiple of the total weight.


How many times will a bell tower ring? Introduction
A bell tower will ring its bells every hour, n times, with n being the the current hour on a 12 hour clock.
For example, a bell will ring 5 times at 5pm, and 10 times at 10am.
Task
Given two times in a suitable format, output the number of times the bell will ring, inclusive of the start and end times
Examples
"10am-12pm"
10+11+12= 33

[01:00, 05:00]
1+2+3+4+5 = 15

[11, 15]
11+12+1+2+3 = 29

[10:00pm, 10:00am]
10+11+12+1+2+3+4+5+6+7+8+9+10 = 88

If the start is the same as the end then the you simply just ouput the number of chimes for that hour:
[5pm, 5pm]
5 = 5

As you can see, you may choose an input method but the output must be an integer on its own (or an acceptable alternative) trailing/ leading newlines and spaces are allowed.
Note:

inputs may span from the afternoon of one day to the morning of the next.
the difference between the two times will never be more than 24 hours.
input is flexible so long as you clearly state what format your input is.
your input must have a clear distinction between AM and PM.

JavaScript (ES6), 38 35 bytes

f=(x,y)=>~-x%12-~(x-y&&f(x%24+1,y))

Recursively adds the current number of bell rings to the total. Called like f(11,15); midnight is represented as 24. I got part of the ~- trick from @xnor's Python answer.

Test snippet

f=(x,y)=>~-x%12-~(x-y&&f(x%24+1,y))
g=(x,y)=>console.log("x:",x,"y:",y,"result:",f(x,y))

g(10,12)
g(1,5)
g(11,15)
g(22,10)
<input id=A type="number" min=1 max=24 value=9>
<input id=B type="number" min=1 max=24 value=17>
<button onclick="g(A.value,B.value)">Run</button>

Non-recursive version (Firefox 30+), 56 bytes

(x,y,t=0)=>[for(_ of Array((y-x+25)%24))t+=x++%12||12]|t

Equivalent to the following ES6 function:

(x,y,t=0)=>[...Array((y-x+25)%24))].map(_=>t+=x++%12||12)|t


Probability of something happening at least n out of m times Write a program or function, that given a success probability p, a number n and a number of trials m returns the chance of at least n successes out of m trials.

Your answer must be precise to at least 5 digits after the decimal.

Test cases:

 0.1, 10, 100 -> 0.54871
 0.2, 10, 100 -> 0.99767
 0.5, 13,  20 -> 0.13159
 0.5,  4,   4 -> 0.06250
0.45, 50, 100 -> 0.18273
 0.4, 50, 100 -> 0.02710
   1,  1,   2 -> 1.00000
   1,  2,   1 -> 0.00000
   0,  0,   1 -> 1.00000
   0,  0,   0 -> 1.00000
   0,  1,   1 -> 0.00000
   1,  1,   0 -> 0.00000

Mathematica, 29 bytes

BetaRegularized[#3,#,1+#2-#]&

Takes input in the order n,m,p. Mathematica is so good, it even golfs your code for you:

BetaRegularized is the regularised incomplete beta function.


Fill the histogram with water Imagine a histogram. Pour an infinite amount of water on to it. Then stop. How much water does the histogram hold?

Let's say we have a histogram with columns of these heights:

1 3 2 1 4 1 3

That would look like this:

    #
 #  # #
 ## # #
#######
1321413

If we pour an infinite amount of water on this histogram, some of those holes will fill up, and we'll end up with this:

    #
 #..#.#
 ##.#.#
#######
1321413

Apparently, this histogram can hold 5 slots of water.

Your task, should you choose to accept it, is to calculate the number of slots of water that a given histogram can hold. You may accept the input as a list, string, array, matrix, bitmap or whatever format you like. The output should be nothing but a single integer, in any format you like.

The input will only contain column heights between 1 and 1000, and the input size is between 1 and 1000 columns.

Test cases:

1 -> 0
2 1 2 -> 1
1 3 2 1 4 1 3 -> 5
1 3 5 7 6 4 2 1 -> 0
7 1 1 1 1 1 1 1 1 1 7 -> 54
2 6 3 5 2 8 1 4 2 2 5 3 5 7 4 1 -> 35

If you're looking for possible ways to solve this problem, here's four.

This is code golf, so the least bytes of source code wins.

Retina, 16 bytes

(?<=# *) (?= *#)

Try it online! Link includes test case. Works by counting the spaces which are surrounded by #s.


Make an Emergency Corridor In some nations there are recommendations or laws on how to form emergency corridors on streets that have multiple lanes per direction. (In the following we only consider the lanes going in the direction we are travelling.) These are the rules that hold in Germany:

If there is only one lane, everyone should drive to the right such that the rescue vehicles can pass on the left.
If there are two or more lanes, the cars on the left most lane should drive to the left, and everyone else should move to the right.

Challenge
Given the number N>0 of regular lanes, output the layout of the lanes when an emergency corridor is formed using a string of N+1 ASCII characters. You can use any two characters from ASCII code 33 up to 126, one to denote the emergency corridor, and one for denoting the cars. Trailing or leading spaces, line breaks etc are allowed.
Examples
Here we are using E for the emergency corridor, and C for the cars.
N  Output
1  EC
2  CEC
3  CECC
4  CECCC
5  CECCCC
6  CECCCCC
   etc


Testing for admissible sequences Executive summary: test whether an input sequence of integers is "admissible", meaning that it doesn't cover all residue classes for any modulus.

What is an "admissible" sequence?

Given an integer m ≥ 2, the residue classes modulo m are just the m possible arithmetic progressions of common difference m. For example, when m=4, the 4 residue classes modulo 4 are

..., -8, -4, 0, 4, 8, 12, ...
..., -7, -3, 1, 5, 9, 13, ...
..., -6, -2, 2, 6, 10, 14, ...
..., -5, -1, 3, 7, 11, 15, ...

The kth residue class consists of all the integers whose remainder upon dividing by m equals k. (as long as one defines "remainder" correctly for negative integers)

A sequence of integers a1, a2, ..., ak is admissible modulo m if it fails to intersect at least one of the residue classes. For example, {0, 1, 2, 3} and {-4, 5, 14, 23} are not admissible modulo 4, but {0, 1, 2, 4} and {0, 1, 5, 9} and {0, 1, 2, -3} are admissible modulo 4. Also, {0, 1, 2, 3, 4} is not admissible modulo 4, while {0, 1, 2} is admissible modulo 4.

Finally, a sequence of integers is simply admissible if it is admissible modulo m for every integer m ≥ 2.

The challenge

Write a program or function that takes a sequence of integers as input, and returns a (consistent) Truthy value if the sequence is admissible and a (consistent) Falsy value if the sequence is not admissible.

The input sequence of integers can be in any reasonable format. You may assume that the input sequence has at least two integers. (You may also assume that the input integers are distinct if you want, though it probably doesn't help.) You must be able to handle positive and negative integers (and 0).

Usual code-golf scoring: the shortest answer, in bytes, wins.

Sample input

The following input sequences should each give a Truthy value:

0 2
-1 1
-100 -200
0 2 6
0 2 6 8
0 2 6 8 12
0 4 6 10 12
-60 0 60 120 180
0 2 6 8 12 26
11 13 17 19 23 29 31
-11 -13 -17 -19 -23 -29 -31

The following input sequences should each give a Falsy value:

0 1
-1 4
-100 -201
0 2 4
0 2 6 10
0 2 6 8 14
7 11 13 17 19 23 29
-60 0 60 120 180 240 300

Tips

Note that any sequence of 3 or fewer integers is automatically admissible modulo 4. More generally, a sequence of length k is automatically admissible modulo m when m > k. It follows that testing for admissibility really only requires checking a finite number of m.
Note also that 2 divides 4, and that any sequence that is admissible modulo 2 (that is, all even or all odd) is automatically admissible modulo 4. More generally, if m divides n and a sequence is admissible modulo m, then it is automatically admissible modulo n. To check admissibility, it therefore suffices to consider only prime m if you wish.
If a1, a2, ..., ak is an admissible sequence, then a1+c, a2+c, ..., ak+c is also admissible for any integer c (positive or negative).

Mathematical relevance (optional reading)

Let a1, a2, ..., ak be a sequence of integers. Suppose that there are infinitely many integers n such that n+a1, n+a2, ..., n+ak are all prime. Then it's easy to show that a1, a2, ..., ak must be admissible. Indeed, suppose that a1, a2, ..., ak is not admissible, and let m be a number such that a1, a2, ..., ak is not admissible modulo m. Then no matter what n we choose, one of the numbers n+a1, n+a2, ..., n+ak must be a multiple of m, hence cannot be prime.

The prime k-tuples conjecture is the converse of this statement, which is still a wide open problem in number theory: it asserts that if a1, a2, ..., ak is an admissible sequence (or k-tuple), then there should be infinitely many integers n such that n+a1, n+a2, ..., n+ak are all prime. For example, the admissible sequence 0, 2 yields the statement that there should be infinitely many integers n such that both n and n+2 are prime, this is the twin primes conjecture (still unproved).

Brachylog, 25 24 19 bytes

5 bytes thanks to Karl Napf.

lybb'(eM-yA,?:[M]z:%aodA)
l:2'(eM-yA,?:[M]z:%aodA)
l:2'(eMg:?rz:%adlM)

Try it online!

Verify all testcases!

l:2'(eMg:?rz:%adlM)
l:2                  Temp = [2:length(input)]
   '(             )  true if the following cannot be proven:
     eM                  M is an element of the interval
                         indicated by Temp, i.e. from 2
                         to the length of input inclusive,
       g:?rz:%adlM       every element of input modulo M
                         de-duplicated has length M.


Medieval orthography Task

Your task is to convert a text into medieval orthography.

Details

j is converted to i and J to I.
u and U at the beginning of words are converted to v and V respectively.
v and V at anywhere except the beginning of words are converted to u and U respectively.
s is converted to ſ (U+017F) unless at the end of the word or preceded by another s.

Specs

A word is defined as a sequence of letters in abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.
All words will have at least two letters.
The input will only consist of printable ASCII characters (U+0020 - U+007E).
There will be no occurrences of more than two consecutive s. That is, sss will not be a substring of the input.

Testcases

Individual words:

Input       Output
------------------------
Joy         Ioy
joy         ioy
Universe    Vniuerſe
universe    vniuerſe
Success     Succeſs
successfull ſucceſsfull
Supervise   Superuiſe
supervise   ſuperuiſe
Super-vise  Super-viſe
I've        I've
majors      maiors
UNIVERSE    VNIUERSE
0universe   0vniuerſe
0verify     0verify
I0ve        I0ve
_UU_          _VU_
_VV_          _VU_
ss_         ſs_

Whole paragraph:

Input:  Christian Reader, I have for thy use collected this small Concordance, with no small labour. For being to comprise much in little roome, I was to make choyse of the most principall and usefull places, and to rank them under such words as I thought most essentiall and materiall in the sentence, because the scant roome allotted unto me, would not permit that I should expresse them under every word in the verse, as it is the manner in large Concordances.

Output: Chriſtian Reader, I haue for thy vſe collected this ſmall Concordance, with no ſmall labour. For being to compriſe much in little roome, I was to make choyſe of the moſt principall and vſefull places, and to rank them vnder ſuch words as I thought moſt eſsentiall and materiall in the ſentence, becauſe the ſcant roome allotted vnto me, would not permit that I ſhould expreſse them vnder euery word in the verſe, as it is the manner in large Concordances.

The SHA-256 hash of the output of the last testcase is:

5641899e7d55e6d1fc6e9aa4804f2710e883146bac0e757308afc58521621644

Disclaimer

Medievall orthographie is not that conſtante. Pleaſe do not complayne if you ſhall ſee olde bookes with a different orthographie.

SED, 144 140 111 Bytes

saved 29 bytes thanks to NoOneIsHere

-r -e'y/j/i/g;y/J/I/g;s/ u/ v/g;s/ U/ V/g;s/^u/v/g;s/^U/V/g;s/([^s])s(\w)/\1ſ\2/g;s/(\w)v/\1u/g;s/(\w)V/\1U/g'


Reconstruct an integer from its prime exponents All integers \$n > 0\$ can be expressed in the form
$$n = \prod_{\text{prime } p} p^e = 2^{e_2} 3^{e_3} 5^{e_5} 7^{e_7} \cdots$$
This form is also known as it's prime factorisation or prime decomposition, and each integer has a unique prime factorisation.
As the bases are fixed, it is possible to reconstruct an integer when just given a list of the exponents of it's prime factorisation. For example, given \$E = [0,3,2,1,0,2]\$ we can reconstruct \$n\$ as
$$
\begin{align}
n & = 2^0 3^3 5^2 7^1 11^0 13^2 \\
& = 1 \cdot 27 \cdot 25 \cdot 7 \cdot 1 \cdot 169 \\
& = 798525
\end{align}
$$
Therefore, \$[0,3,2,1,0,2] \to 798525\$, and is the only such list (ignoring trailing zeros) that does so.
You are to take an input consisting of non-negative integers representing the exponents of the prime factorisation of some integer and output the integer with that prime factorisation.
Both the integer and the elements of the input will be within the bounds of your language, and you can take input in any convenient method. You may have an arbitrary (from 0 to infinite) number of trailing zeros in the input. The array will never be empty, but may be [0]
This is code-golf so the shortest code in bytes wins
Test cases
[0] -> 1
[1] -> 2
[3, 2] -> 72
[0, 1, 2] -> 75
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] -> 347
[6, 2] -> 576
[1, 7] -> 4374
[5, 7] -> 69984
[10, 5] -> 248832
[1, 0, 0, 8, 4] -> 168804902882
[3, 8, 10] -> 512578125000
[7, 9, 0, 8] -> 14523977994624
[4, 4, 7, 0, 0, 5, 5] -> 53377275216476250000
[1, 8, 1, 7, 8, 1] -> 150570936449966222190
[10, 0, 2, 8, 9] -> 347983339699826969600
[4, 8, 2, 3, 7, 9] -> 186021488852335961308083600
[7, 6, 6, 8, 6, 8, 4] -> 1014472920935186644572261278658000000
[9, 6, 7, 5, 1, 8, 10] -> 8865565384329431006794755470280000000

Python 2, 61 bytes
Wilson's theroem FTW!

f=lambda p,a=1,b=1:p==[]or b**(a%b*p[0])*f(p[a%b:],a*b*b,b+1)

Try it online!
Python 2, 62 bytes

f=lambda p,a=1,b=1:p==[]or(a%b<1or b**p.pop(0))*f(p,a*b*b,b+1)

Try it online!


Kolmogorov Flexibility. A.K.A. Sale! \$38\%\$ Off All Codegolf While Stocks Last! This is a restricted-source, kolmogorov-complexity, code-golf challenge to produce a fixed output with no input.
The output format, however, is flexible - it may be printed to standard out, printed to standard error, returned as a list of characters, returned as a list of bytes, or returned as a list of integers. If you think anything else seems reasonable just ask in the comments!
Here is a simple, big-letter ASCII art CODEGOLF:
 CCCC   OOO   DDDD   EEEEE   GGG    OOO   L      FFFFF
C      O   O  D   D  E      G      O   O  L      F
C      O   O  D   D  EEE    G  GG  O   O  L      FFF
C      O   O  D   D  E      G   G  O   O  L      F
 CCCC   OOO   DDDD   EEEEE   GGGG   OOO   LLLLL  F

Without any newlines (or trailing spaces on any lines) it is 256 characters long:
 CCCC   OOO   DDDD   EEEEE   GGG    OOO   L      FFFFFC      O   O  D   D  E      G      O   O  L      FC      O   O  D   D  EEE    G  GG  O   O  L      FFFC      O   O  D   D  E      G   G  O   O  L      F CCCC   OOO   DDDD   EEEEE   GGGG   OOO   LLLLL  F

The (0-based) indices of the non-space characters are:
1, 2, 3, 4, 8, 9, 10, 14, 15, 16, 17, 21, 22, 23, 24, 25, 29, 30, 31, 36, 37, 38, 42, 49, 50, 51, 52, 53, 54, 61, 65, 68, 72, 75, 82, 89, 93, 96, 103, 104, 111, 115, 118, 122, 125, 126, 127, 132, 135, 136, 139, 143, 146, 153, 154, 155, 156, 163, 167, 170, 174, 177, 184, 188, 191, 195, 198, 205, 207, 208, 209, 210, 214, 215, 216, 220, 221, 222, 223, 227, 228, 229, 230, 231, 235, 236, 237, 238, 242, 243, 244, 248, 249, 250, 251, 252, 255

You may not use any of these 97 bytes in your code but must produce a list (or similarly output) these bytes, in this order, with the missing bytes replaced by the 32nd byte in the code page you are using (in many, many code-pages a space character).
You may include the pretty-printing* newlines (but no trailing spaces on the lines) if it helps.
For example using the Jelly code-page this output is acceptable:
 ¢£¤¥   ®µ½   ÇÐÑ×   ßæçðı   øœþ    $%&   *      12345
6      =   A  D   H  K      R      Y   ]  `      g
h      o   s  v   z  }~¶    ⁴  ⁷⁸  ⁻   Ɓ  Ƒ      ƲȤɓ
ƈ      ɲ   ʂ  ȥ   Ẹ  Ḳ      Ṭ   Ỵ  Ḃ   Ḟ  İ      Ṡ
 ẆẊẎŻ   ẹḥị   ṇọṛṣ   ẉỵẓȧḃ   ḟġḣŀ   ṗṙṡ   ẏż«»‘  ”

...but so is:
 ¢£¤¥   ®µ½   ÇÐÑ×   ßæçðı   øœþ    $%&   *      123456      =   A  D   H  K      R      Y   ]  `      gh      o   s  v   z  }~¶    ⁴  ⁷⁸  ⁻   Ɓ  Ƒ      ƲȤɓƈ      ɲ   ʂ  ȥ   Ẹ  Ḳ      Ṭ   Ỵ  Ḃ   Ḟ  İ      Ṡ ẆẊẎŻ   ẹḥị   ṇọṛṣ   ẉỵẓȧḃ   ḟġḣŀ   ṗṙṡ   ẏż«»‘  ”

...and so is:
[32, 1, 2, 3, 4, 32, 32, 32, 8, 9, 10, 32, 32, 32, 14, 15, 16, 17, 32, 32, 32, 21, 22, 23, 24, 25, 32, 32, 32, 29, 30, 31, 32, 32, 32, 32, 36, 37, 38, 32, 32, 32, 42, 32, 32, 32, 32, 32, 32, 49, 50, 51, 52, 53, 54, 32, 32, 32, 32, 32, 32, 61, 32, 32, 32, 65, 32, 32, 68, 32, 32, 32, 72, 32, 32, 75, 32, 32, 32, 32, 32, 32, 82, 32, 32, 32, 32, 32, 32, 89, 32, 32, 32, 93, 32, 32, 96, 32, 32, 32, 32, 32, 32, 103, 104, 32, 32, 32, 32, 32, 32, 111, 32, 32, 32, 115, 32, 32, 118, 32, 32, 32, 122, 32, 32, 125, 126, 127, 32, 32, 32, 32, 132, 32, 32, 135, 136, 32, 32, 139, 32, 32, 32, 143, 32, 32, 146, 32, 32, 32, 32, 32, 32, 153, 154, 155, 156, 32, 32, 32, 32, 32, 32, 163, 32, 32, 32, 167, 32, 32, 170, 32, 32, 32, 174, 32, 32, 177, 32, 32, 32, 32, 32, 32, 184, 32, 32, 32, 188, 32, 32, 191, 32, 32, 32, 195, 32, 32, 198, 32, 32, 32, 32, 32, 32, 205, 32, 207, 208, 209, 210, 32, 32, 32, 214, 215, 216, 32, 32, 32, 220, 221, 222, 223, 32, 32, 32, 227, 228, 229, 230, 231, 32, 32, 32, 235, 236, 237, 238, 32, 32, 32, 242, 243, 244, 32, 32, 32, 248, 249, 250, 251, 252, 32, 32, 255]

(This last one is a valid list output in any language with any code-page, and one may use any reasonable list-formatting too.)

Here is Python 3 code which shows the unavailable ASCII bytes.
* Although the printing itself might not actually be all that pretty!

Python 2, 321 203 bytes

print map(lambda(i,x):(x>'0'and i-8-8-8-8)+8+8+8+8,enumerate(bin(int(reduce(lambda x,y:x+repr('abcdefijkl'.find(y)),'cfjdbljcibkeajjejiljjlcbjddlafklebajjlceljdeadficijflealkeklkljadfbbckjebclkf','')))))

Try it online!

Explanation:

from the inside out:

cfjdbljcibkeajjejiljjlcbjddlafklebajjlceljdeadficijflealkeklkljadfbbckjebclk is the number 25731972618407747697792173390589410779249734035626759409848989703511287412985 encoded with allowed characters. (No 123456's allowed)

reduce(lambda x,y:x+repr('abcdefijkl'.find(y)),'cfjdbl..bclkf','')
maps the string to its decimal string:

reduce(lambda x,y:x+y,'..','') is the same as ''.join('..') (No o's allowed)
repr('..') instead of str('..') (No s's allowed)
'abcdefijkl'.find(y) maps a char to a digit.

enumerate(bin(int(...))) converts the number string to a binary string, and enumerates. This gives the pairs [(0,0), (1,b), (2,1), (3,1), ...]

map(lambda(i,x):(x>'0'and i-8-8-8-8)+8+8+8+8, ... ) converts the enumerated list to the final result.

map(lambda(i,x):.. , .. ) instead of [... for(i,x)in ...] (No o]'s allowed)
lambda(i,x): .. converts each (index,value) pair to either the index or 32.
(x>'0'and i-8-8-8-8)+8+8+8+8 is the same as:

x>'0'and i or 8+8+8+8, (No o's allowed)
[8+8+8+8,i][x>'0'] or [8<<9-7,i][x>'0'], (No ]'s allowed)

8+8+8+8 = 32 (No 23's allowed)

This means that the program is essentially the same as:

print[[32,i][x>'0']for i,x in enumerate(bin(25731972618407747697792173390589410779249734035626759409848989703511287412985))]


Generate binary matrices which are distinct up to reflections Here are all the 2x2 binary matrices

#0  #1  #2  #3  #4  #5  #6  #7  #8  #9  #10 #11 #12 #13 #14 #15
--  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
00  00  00  00  01  01  01  01  10  10  10  10  11  11  11  11
00  01  10  11  00  01  10  11  00  01  10  11  00  01  10  11

Two binary square matrices are equivalent under the relation ~ if one can be mapped onto the other by any number of reflections in the horizontal or vertical axes.

#1 ~ #2 under reflection in the vertical axis so we only need to keep one of these (it doesn't matter which). Likewise #3 ~ #12, #6 ~ #9 and so on.

THE GOAL is to produce a program which takes a single input N and prints as many N x N binary matrices as exist such that all matrices in the output are distinct under the above relation.

In hand-wavey pseudocode, an admissible solution would be

define M[i] = N by N matrix with bit pattern equal to i

for i = 0 to (2^(N^2)) - 1
    valid = true
    for j = i+1 to (2^(N^2)) - 1
        if (equivalent(M[i], M[j]))
            valid = false
            break
    if (valid)
        print (M[i])

For the input N=2 one valid output would be

00  00  00  01  10  01  11
00  01  11  01  01  11  11

But by selecting different matrices from the same equivalence class another valid output would be

00  10  11  11  11  10  01
00  00  00  10  11  10  10

The order of matrices doesn't matter, the particular choice from equivalent matrices doesn't matter, and whitespace doesn't matter, output the matrices however you like as long as it's human-readable.

The output must be exhaustive.

Shortest code wins.

EDIT: this is my first golf post and I've changed my mind on the winning criteria.

Shortest code in a language not specifically designed for conciseness/golfing wins.

I hope it's not bad etiquette to change this criterion post-hoc, but I think doing it in a "normal" language is a much more interesting proposition.

Jelly, 19 bytes

Ṛ€;U;
2ḶṗṗµWÇ³¡Ṃµ€Q

Try it online!

How it works

2ḶṗṗµWÇ³¡Ṃµ€Q  Main link. Argument: n (integer)

2Ḷ             Unlength 2; yield [0, 1].
  ṗ            Cartesian product; construct all vectors of {0, 1}^n.
   ṗ           Cartesian product; construct all vectors of ({0, 1}^n)^n.
               This yields A, the array of all binary n×n matrices.
    µ     µ€   Begin a new, monadic chain and apply it to all matrices M in A.
     W           Wrap; yield [M].
      Ç³¡        Call the helper link n times, initially with argument [M], then
                 on the previous return value.
         Ṃ       Take the minimum of the results.
               This replaces all matrices with the lexicographical minimum of their
               equivalence classes, mapping equivalent matrices to the same matrix.
            Q  Unique; deduplicate the resulting array of matrices.

Ṛ€;U;          Helper link. Argument: L (array of matrices)

Ṛ€             Reverse the order of the rows of each M in L.
   U           Reverse the order of the columns of each M in L.
  ;            Concatenate the resulting matrix arrays.
    ;          Concatenate the result with L.


“Disprove” Fermat's Last Theorem Write a program, in the language of your choice, that appears to successfully find a counterexample to Fermat's Last Theorem.  That is, find integers a, b, c > 0 and n > 2 such that an + bn = cn.

Of course, you can't really do it, unless there's a flaw in Andrew Wiles' proof.  I mean fake it, by relying on

integer overflow
floating-point rounding error
undefined behavior
data types with unusual definitions of addition, exponentiation, or equality
compiler/interpreter bugs
or something along those lines.

You may hard-code some or all of the variables a, b, c, or n, or search for them by doing loops like for a = 1 to MAX.

This isn't a code golf; it's a contest to find clever and subtle solutions.

J

Actually, Fermat did make quite a blunder: It's actually wrong for any b, c or n if a is 1:

   1^3 + 4^3 = 5^3
1
   1^4 + 5^4 = 11^4
1
   1^9 + 3^9 = 42^9
1

   Maybe just maybe, Fermat's precedence rules weren't strictly right to left.


Read numbers in the base of the largest digit and write it using underscores This isn't as much a "challenge" as "a unique problem that there are no built-in functions to solve." Basically, you need to do this:

Read some lines of numbers from stdin. These lines may contain trailing or preceding whitespace, and there may be empty lines. No lines will contain "just whitespace" other than a newline. Each non-empty line will have exactly one number. This:

 123

456\t

(where \t is a tab) is considered valid input.
Read the numbers in the input in base N+1, where N is the largest digit in any of the lines. In this case, the largest digit is 6, so the numbers would be read in base 7, resulting in 6610 and 23710.
Find the sum of the numbers. The sum of 6610 and 23710 is 30310.
Convert the sum back to base N+1 again. We'd convert 30310 to base 7, which would be 6127.
For each digit, print that many underscores, followed by a space. The last digit should instead be followed by a newline or a space and a newline. In our example, that would be ______ _ __\n or ______ _ __ \n, where \n is the newline character.

Here's an example in Python:

import sys

def convert_to_base(n, b):
    'Convert `n` to base `b`'
    res = []
    while n:
        res.append(n % b)
        n /= b
    return res[::-1]

# read the lines, discarding empty ones and stripping any whitespace
lines = map(str.strip, filter(None, list(sys.stdin)))
# find the largest digit, and add 1 to it to make our base
base = max(map(max, (map(int, line) for line in lines)))+1
# read the lines in the base and sum them
result = sum(int(line, base) for line in lines)
# print the result in the original base using underscores, separated by spaces
for number in convert_to_base(result, base):
    print '_'*number,
# print a newline
print

This is code golf: the shortest program wins!

Pyth, 26

JscR).zjd*R\_jsiRKhseSsJJK

Demonstration.

JscR).z
     .z                       Take the input as a list of lines.
  cR)                         Remove all whitespace from each line.
 s                            Combine the lines.
J                             Save the result to J.
                              J is now the list of the string forms of the numbers.
       jd*R\_jsiRKhseSsJJK
                      sJ      Combine J into one string.
                    eS        Find the maximum of that string.
                   s          Convert it to an integer.
                  h           Add one.
                 K            Save to K. K is the base.
               iRK      J     Convert the strings in J to base K.
              s               Add them together.
             j           K    Convert the result back to base K, as a list of ints.
         *R\_                 Map each int in that list to that many underscores.
       jd                     Join on spaces and print.


A scene of Jimmy diversity As you probably know, there have been multiple lovely Jimmy challenges recently popping up. In these challenges, you were challenged with our beloved friend's acrobatics skills. Now we've got a different challenge for you. Today you will be identifying different types of Jimmys!

Explanation

There are three varieties of Jimmys: dwarf, acrobat, and bodybuilder.

This is dwarf Jimmy:               o

This is acrobat Jimmy:            /o\

This is bodybuilder Jimmy:       /-o-\

These Jimmys are all great friends and they like to stand on the same line as each other. Your task is, given a Jimmy scene like so:

  o  /o\       o   /-o-\/-o-\  o          /o\

Output the amount of dwarves, acrobats, and bodybuilders on the line, respectively.

The challenge

Take input in any reasonable form as a Jimmy scene, as shown in an example above.

The input string should be one line and optionally contains the three varieties of Jimmys and optional whitespace.
The string will not necessarily contain all of the Jimmy varieties or whitespace.
The string will not contain any characters not in o/\ -.
Any combination of Jimmy varieties is possible. This means that the same or different type of Jimmy can be next to each other. You must account for that.
Leading and trailing whitespace is optional and by no means required - your program should account for a string with or without leading and/or trailing whitespace.
The string should contain only valid Jimmys and whitespace. For instance, ---///--- is not allowed because it is not a valid Jimmy sequence.

Output three numbers: The count of dwarves, acrobats, and bodybuilders in the scene (in respective order).

This may be an output to the console as space-separated integers, or it may be a return value from a function as some sort of container (i.e an array type).
The output, in whatever format, must be ordered as mentioned in the top bullet above this rule.

Standard rules and loopholes apply.

Test cases

     /-o-\           /-o-\     o/o\  /-o-\       /-o-\                /-o-\
OUTPUT: 1 1 5

      o o               /o\    o o      o                    /o\             /o\
OUTPUT: 5 3 0

 /-o-\     /-o-\            /-o-\/-o-\   o /o\/o\    /-o-\o /-o-\       /o\/-o-\
OUTPUT: 2 3 7

  /-o-\  o                 /-o-\               o/o\
OUTPUT: 2 1 2

If you'd like more test cases, use this tool to generate more random test cases.

Scoring

This is code-golf, so lowest score in bytes wins.

You can view the leaderboard for this post by expanding the widget/snippet below. In order for your post to be included in the rankings, you need a header (# header text) with the following info:

The name of the language (end it with a comma , or dash -), followed by...
The byte count, as the last number to appear in your header.

For example, JavaScript (ES6), 72 bytes is valid, but Fortran, 143 bytes (8-bit) is invalid because the byte count is not the last number in the header (your answer will be recognized as 8 bytes - don't take advantage of this).

<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github. -->    <iframe src="https://ozewski.github.io/ppcg-leaderboard/?id=188391" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,body{margin:0;padding:0;height:100%;overflow:hidden}</style>

Python 3.8 (pre-release), 51 bytes

lambda s:((c:=s.count)('o')-c('/'),c('/o'),c('/-'))

Try it online!


An abundance of integers! An Abundant number is any number where the sum of its proper divisors is greater than the original number. For example, the proper divisors of 12 are:

1, 2, 3, 4, 6

And summing these results in 16. Since 16 is larger than 12, 12 is abundant. Note that this does not include "Perfect numbers", e.g. numbers that are equal to the sum of its proper divisors, such as 6 and 28.

Your task for today is to write a program or function that determines if a number is abundant or not. Your program should take a single integer as input, and output a truthy/falsy value depending on whether it is abundant or not. You can assume that the input will always be valid and greater than 0, so for bad inputs, undefined behavior is fine.

You may take your input and output in any reasonable format, for example STDIN/STDOUT, files, or arguments/return values would all be acceptable.

For reference, here are the abundant numbers up to 100:

12,
18,
20,
24,
30,
36,
40,
42,
48,
54,
56,
60,
66,
70,
72,
78,
80,
84,
88,
90,
96,
100

And more can be found on A005101

Since this is code-golf, standard loopholes are denied, and try to write the shortest possible code you can in whichever language you happen to choose!

Regex (ECMAScript), 1085 855 597 536 511 508 504 bytes
Matching abundant numbers in ECMAScript regex is an entirely different beast than doing so in practically any other regex flavor. The lack of forward/nested backreferences or recursion means that it is impossible to directly count or keep a running total of anything. The lack of lookbehind makes it often a challenge even to have enough space to work in.
Many problems must be approached from an entirely different perspective, and you'll be wondering if they're solvable at all. It forces you to cast a much wider net in finding which mathematical properties of the numbers you're working with might be able to be used to make a particular problem solvable.
Back in March-April 2014 I constructed a solution to this problem in ECMAScript regex. At first I had every reason to suspect the problem was completely impossible, but then the mathematician teukon sketched an idea that made an encouraging case for making it look solvable after all – but he made it clear he had no intention of constructing the regex (he had competed/cooperated with my on constructing/golfing previous regexes, but reached his limit by this point and was content to restrict his further contributions to theorizing).
Solving unary mathematical problems in ECMAScript regex has been a fascinating journey for me, so in the past I put spoiler warnings in this post and others like it – in case others, especially those with an interest in number theory, wanted to take a crack at independently solving things like generalized multiplication. I am now removing the spoiler warnings though; they did not prove to be constructive.
Before posting my ECMAScript regex, I thought it would be interesting to analyze Martin Ender's .NET pure regex solution, ^(?!(1(?<=(?=(?(\3+$)((?>\2?)\3)))^(1+)))*1$). It turns out to be very straightforward to understand that regex, and it is elegant in its simplicity. To demonstrate the contrast between our solutions, here is a commented and pretty-printed (but unmodified) version of his regex:
# For the purpose of these comments, the input number will be referred to as N.

^(?!                  # Attempt to add up all the divisors. Since this is a regex and we
                      # can only work within the available space of the input, that means
                      # if the sum of the divisors is greater than N, the attempt to add
                      # all the divisors will fail at some point, causing this negative
                      # lookahead to succeed, showing that N is an abundant number.

  (1                  # Cycle through all values of tail that are less than N, testing
                      # each one to see if it is a divisor of N.

    (?<=              # Temporarily go back to the start so we can directly operate both
                      # on N and the potential divisor. This requires variable-length
                      # lookbehind, a .NET feature – even though this special case of
                      # going back to the start, if done left-to-right, would actually be
                      # very easy to implement even in a regex flavour that has no
                      # lookbehind to begin with. But .NET evaluates lookbehinds right
                      # to left, so please read these comments in the order indicated,
                      # from [Step 1] to [Step 7]. The comment applying to entering the
                      # lookahead group, [Step 2], is shown on its closing parenthesis.
      (?=             # [Step 3] Since we're now in a lookahead, evaluation is left to
                      #          right.
        (?(\3+$)      # [Step 4] If \3 is a divisor of N, then...
          (           # [Step 5] Add it to \2, the running total sum of divisors:
                      #          \2 = \2 + \3
            (?>\2?)   # [Step 6] Since \2 is a nested backref, it will fail to match on
                      #          the first iteration. The "?" accounts for this, making
                      #          it add zero to itself on the first iteration. This must
                      #          be done before adding \3, to ensure there is enough room
                      #          for the "?" not to cause the match to become zero-length
                      #          even if \2 has a value.
            \3        # [Step 7] Iff we run out of space here, i.e. iff the sum would
                      #          exceed N at this point, the match will fail, making the
                      #          negative lookahead succeed, showing that we have an
                      #          abundant number.
          )

        )
      )               # [Step 2] Enter a lookahead that is anchored to the start due to
                      #          having a "^" immediately to its right. The regex would
                      #          still work if the "^" were moved to the left of the
                      #          lookahead, but would be slightly slower, because the
                      #          engine would do some spurious matching before hitting
                      #          the "^" and backtracking.
      ^(1+)           # [Step 1] \3 = number to test for being a potential divisor – its
                      #               right-side-end is at the point where the lookbehind
                      #               started, and thus \3 cycles through all values from
                      #               1 to N-1.
    )
  )*1$                # Exclude N itself from being considered as a potential divisor,
                      # because if we included it, the test for proper abundance would be
                      # the sum of divisors exceeding 2*N. We don't have enough space for
                      # that, so instead what would happen if we did not exclude N as a
                      # divisor would be testing for "half-abundance", i.e. the sum of
                      # all divisors other than N exceeding N/2. By excluding N as a
                      # divisor we can let our threshold for abundance be the sum of
                      # divisors exceeding N.
)

Try the .NET regex online
Now, back to my ECMAScript regex. First, here it is in raw, whitespace-and-comment-free format:
^(?=(((?=(xx+?)\3+$)(x+)\4*(?=\4$))+(?!\3+$)(?=(xx(x*?))\5*$)x)(x+))(?=\1(x(x*))(?=\8*$)\6\9+$)(?=(.*)((?=\8*$)\5\9+$))(?=(x*?)(?=(x\11)+$)(?=\12\10|(x))(x(x*))(?=\15*$)(?=\11+$)\11\16+$)(?=(x(x*))(?=\17*$)\7\18+$)((?=(x*?(?=\17+$)(?=\17+?(?=((xx(x*))(?=\18+$)\22*$))(x+).*(?=\17$)\24*(?=\24$)(?!(xx+)\25*(?!\22+$)\25$)\22+$)((?=(x\7)+$)\15{2}\14|)))(?=.*(?=\24)x(x(x*))(?=\28*$)\23\29*$)(?=.*(x((?=\28*$)\22\29+$)))(.*(?!\30)\20|(?=.*?(?!x\20)(?=\30*$)(x(x*))(?=\33*$)(?=\31+$)\31\34+$).*(?=\33\21$)))+$
(change \14 to \14? for compatibility with PCRE, .NET, and practically every other regex flavour that's not ECMAScript)
Try it online!
Try it online! (faster, 537 byte version of the regex)
And now a brief summary of the story behind it.
At first it was very non-obvious, to me at least, that it was even possible to match primes in the general case. And after solving that, the same applied to powers of 2. And then powers of composite numbers. And then perfect squares. And even after solving that, doing generalized multiplication seemed impossible at first.
In an ECMAScript loop, you can only keep track of one changing number; that number cannot exceed the input, and has to decrease at every step. My first working regex for matching correct multiplication statements A*B=C was 913 bytes, and worked by factoring A, B, and C into their prime powers – for each prime factor, repeatedly divide the pair of prime power factors of A and C by their prime base until the one corresponding to A reaches 1; the one corresponding to C is then compared to the prime power factor of B. These two powers of the same prime were "multiplexed" into a single number by adding them together; this would always be unambiguously separable on each subsequent iteration of the loop, for the same reason that positional numeral systems work.
We got multiplication down to 50 bytes using a completely different algorithm (which teukon and I were able to arrive at independently, though it took him only a few hours and he went straight to it, whereas it took me a couple days even after it was brought to my attention that a short method existed): for A≥B, A*B=C if and only if C is the smallest number which satisfies C≡0 mod A and C≡B mod A-1. (Conveniently, the exception of A=1 needs no special handling in regex, where 0%0=0 yields a match.) I just can't get over how neat it is that such an elegant way of doing multiplication exists in such a minimal regex flavour. (And the requirement of A≥B can be replaced with a requirement that A and B are prime powers of the same power. For the case of A≥B, this can be proven using the Chinese remainder theorem.) See this post for a more in-depth explanation.
If it had turned out that there was no simpler algorithm for multiplication, the abundant number regex would probably be on the order of ten thousand bytes or so (even taking into account that I golfed the 913 byte algorithm down to 651 bytes). It does lots of multiplication and division, and ECMAScript regex has no subroutines.
I started working on the abundant number problem tangentially in 23 March 2014, by constructing a solution for what seemed at the time to be a sub-problem of this: Identifying the prime factor of highest multiplicity, so that it could be divided out of N at the start, leaving room to do some necessary calculations. At the time this seemed to be a promising route to take. (My initial solution ended up being quite large at 326 bytes, later golfed down to 185 bytes.) But the rest of the method teukon sketched would have been extremely complicated, so as it turned out, I took a rather different route. It proved to be sufficient to divide out the largest prime power factor of N corresponding to the largest prime factor on N; doing this for the prime of highest multiplicity would have added needless complexity and length to the regex.
What remained was treating the sum of divisors as a product of sums instead of a straight sum. As explained by teukon on 14 March 2014:

We're given a number n = p0a0p1a1...pk-1ak-1.  We want to handle the sum of the factors of n, which is (1 + p0 + p02 + ... + p0a0)(1 + p1 + p12 + ... + p1a1)...(1 + pk-1 + pk-12 + ... + pk-1ak-1).

It blew my mind to see this. I had never thought of factoring the aliquot sum in that way, and it was this formula more than anything else that made the solvability of abundant number matching in ECMAScript regex look plausible.
In the end, instead of testing for a result of addition or multiplication exceeding N, or testing that such a result pre-divided by M exceeds N/M, I went with testing if a result of division is less than 1. I arrived at the first working version on 7 April 2014.
The full history of my golf optimizations of this regex is on github. At a certain point one optimization ended up making the regex much slower, so from that point on I maintained two versions. They are:
regex for matching abundant numbers.txt
regex for matching abundant numbers - shortest.txt
These regexes are fully compatible with both ECMAScript and PCRE, but a recent optimization involved using a potentially non-participating capture group \14, so by dropping PCRE compatibility and changing \14? to \14 they can both be reduced by 1 byte.
Here is the smallest version, with that optimization applied (making it ECMAScript-only), reformatted to fit in a StackExchange code block with (mostly) no horizontal scrolling needed:
# Match abundant numbers in the domain ^x*$ using only the ECMAScript subset of regex
# functionality. For the purposes of these comments, the input number = N.
^
# Capture the largest prime factor of N, and the largest power of that factor that is
# also a factor of N. Note that the algorithm used will fail if N itself is a prime
# power, but that's fine, because prime powers are never abundant.
(?=
  (                      # \1 = tool to make tail = Z-1
    (                    # Repeatedly divide current number by its smallest factor
      (?=(xx+?)\3+$)
      (x+)\4*(?=\4$)
    )+                   # A "+" is intentionally used instead of a "*", to fail if N
                         #  is prime. This saves the rest of the regex from having to
                         #  do needless work, because prime numbers are never abundant.
    (?!\3+$)             # Require that the last factor divided out is a different prime.
    (?=(xx(x*?))\5*$)    # \5 = the largest prime factor of N; \6 = \5-2
    x                    # An extra 1 so that the tool \1 can make tail = Z-1 instead of just Z
  )
  (x+)                   # Z = the largest power of \5 that is a factor of N; \7 = Z-1
)
# We want to capture Z + Z/\5 + Z/\5^2 + ... + \5^2 + \5 + 1 = (Z * \5 - 1) / (\5 - 1),
# but in case Z * \5 > N we need to calculate it as (Z - 1) / (\5 - 1) * \5 + 1.
# The following division will fail if Z == N, but that's fine, because no prime power is
# abundant.
(?=
  \1                     # tail = (Z - 1)
  (x(x*))                # \8   = (Z - 1) / (\5 - 1); \9 = \8-1
  # It is guaranteed that either \8 > \5-1 or \8 == 1, which allows the following
  # division-by-multiplication to work.
  (?=\8*$)
  \6\9+$
)
(?=
  (.*)                   # \10 = tool to compare against \11
  (                      # \11 = \8 * \5  =  (Z - 1) / (\5 - 1) * \5; later, \13 = \11+1
    (?=\8*$)
    \5\9+$
  )
)
# Calculate Q = \15{2} + Q_R = floor(2 * N / \13). Since we don't have space for 2*N, we
# need to calculate N / \13 first, including the fractional part (i.e. the remainder),
# and then multiply the result, including the fractional part, by 2.
(?=
  (x*?)(?=(x\11)+$)      # \12 = N % \13; \13 = \11 + 1
  (?=\12\10|(x))         # \14 = Q_R = floor(\12 * 2 / \13)
                         #     = +1 carry if \12 * 2 > \11, or NPCG otherwise
  (x(x*))                # \15 = N / \13; \16 = \15-1
  (?=\15*$)
  (?=\11+$)              # must match if \15 <  \13; otherwise doesn't matter
  \11\16+$               # must match if \15 >= \13; otherwise doesn't matter
)
# Calculate \17 = N / Z. The division by Z can be done quite simply, because the divisor
# is a prime power.
(?=
  (x(x*))                # \17 = N / Z; \18 = \17-1
  (?=\17*$)
  \7\18+$
)
# Seed a loop which will start with Q and divide it by (P^(K+1)-1)/(P-1) for every P^K
# that is a factor of \17. The state is encoded as \17 * P + R, where the initial value
# of R is Q, and P is the last prime factor of N to have been already processed.
#
# However, since the initial R would be larger than \17 (and for that matter there would
# be no room for any nonzero R since with the initial value of P, it is possible for
# \17 * P to equal N), treat it as a special case, and let the initial value of R be 0,
# signalling the first iteration to pretend R=Q. This way we can avoid having to divide Q
# and \17 again outside the loop.
#
# While we're at it, there's really no reason to do anything to seed this loop. To seed
# it with an initial value of P=\5, we'd have to do some multiplication. If we don't do
# anything to seed it, it will decode P=Z. That is wrong, but harmless, since the next
# lower prime that \17 is divisible by will still be the same, as \5 cannot be a factor
# of \17.

# Start the loop.
(
  (?=
    (                    # \20 = actual value of R
      x*?(?=\17+$)       # move forward by directly decoded value of R, which can be zero
      # The division by \17 can be done quite simply, because it is known that
      # the quotient is prime.
      (?=
        \17+?            # tail = \17 * (a prime which divides into \17)
        (?=
          (              # \21 = encoded value for next loop iteration
            (xx(x*))     # \22 = decoded value of next smaller P; \23 = (\22-1)-1
            (?=\18+$)    # iff \22 > \17, this can have a false positive, but never a false negative
            \22*$        # iff \22 < \17, this can have a false positive, but never a false negative
          )
        )
        # Find the largest power of \22 that is a factor of \17, while also asserting
        # that \22 is prime.
        (x+)             # \24 = the largest power of \22 that is a factor of \17
        .*(?=\17$)
        \24*(?=\24$)
        (?!
          (xx+)\25*
          (?!\22+$)
          \25$
        )
        \22+$
      )
      (
        (?=(x\7)+$)      # True iff this is the first iteration of the loop.
        \15{2}\14        # Potentially unset capture, and thus dependent on ECMAScript
                         # behavior. Change "\14" to "\14?" for compatibility with non-
                         # ECMAScript engines, so that it will act as an empty capture
                         # with engines in which unset backrefs always fail to match.
      |
      )
    )
  )
  # Calculate \30 = (\24 - 1) / (\22 - 1) * \22 + 1
  (?=
    .*(?=\24)x           # tail = \24 - 1
    (x(x*))              # \28 = (\24 - 1) / (\22 - 1); \29 = \28-1
    (?=\28*$)
    \23\29*$
  )
  (?=
    .*(x(                # \30 = 1 + \28 * \22 = (\28 - 1) / (\22 - 1) * \22 + 1; \31 = \30-1
      (?=\28*$)
      \22\29+$
    ))
  )
  # Calculate \33 = floor(\20 / \30)
  (
    .*(?!\30)\20         # if dividing \20 / \30 would result in a number less than 1,
                         # then N is abundant and we can exit the loop successfully
  |
    (?=
      .*?(?!x\20)(?=\30*$)
      (x(x*))            # \33 = \20 / \30; \34 = \33-1
      (?=\33*$)
      (?=\31+$)          # must match if \33 <  \30; otherwise doesn't matter
      \31\34+$           # must match if \33 >= \30; otherwise doesn't matter
    )
    # Encode the state for the next iteration of the loop, as \17 * \22 + \33
    .*(?=\33\21$)
  )
)+$


Generate newspaper page number sets A newspaper is made of several sheets; for the purposes of this question, each sheet of newsprint holds four pages of the final newspaper. Here is an example of three sheets of newsprint making up a newspaper with twelve pages:
 ___________
|2    |   11|
|  ___|_____|_
| |4    |    9|
|_|  ___|_____|_
  | |6    |    7|
  |_|     |     |
    |     |     |
    |_____|_____|

(Pages 1, 3, 5, 8, 10 and 12 are on the reverse of these sheets so you can't see them here.)
Your challenge, should you choose to accept it, is to output all the sets of pages that are on each sheet of a given newspaper.
You can take either the number of sheets (which is always a positive integer) or the number of pages (which is always a positive multiple of 4), but please indicate which.
You can output the sets of pages in any reasonable order, as long as it is clear which pages belong in which set.
For example, given an input of 3 sheets or 12 pages, you could output (1, 2, 11, 12), (3, 4, 9, 10) and (5, 6, 7, 8); or you could output (8, 5, 7, 6), (10, 3, 9, 4) and (12, 1, 11, 2); or any variant thereof, but you cannot of course output 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
This is code golf, so please make your program or function as short as possible. (I will even accept the shortest overall program as the answer on request of its author if doing so will earn me a Winter Bash hat.)

convey, 34 bytes
}
/1:`%""{
^1"v4!<
+"+v}+1
^<","-}

Try it online!

Pushes n and n+1 to the right per loop.

For each value outputs i and i-pages+1.

Whenever the left loop passes through the top part, output a newline /}.
Allow n to pass the loop only pages % 4 times.


Give the smallest number that has N divisors Your function takes a natural number and returns the smallest natural number that has exactly that amount of divisors, including itself.

Examples:

f(1) =  1 [1]
f(2) =  2 [1, 2]
f(3) =  4 [1, 2, 4]
f(4) =  6 [1, 2, 3, 6]
f(5) = 16 [1, 2, 4, 8, 16]
f(6) = 12 [1, 2, 3, 4, 6, 12]
 ...

The function doesn't have to return the list of divisors, they are only here for the examples.

APL, 25 24 23 characters
f←{({+/⍵=⍵∧⍳⍵}¨⍳2*⍵)⍳⍵}

Defines a function f which can then be used to calculate the numbers:
> f 13
4096

> f 14
192

The solution utilizes the fact that LCM(n,x)==n iff x divides n. Thus, the block {+/⍵=⍵∧⍳⍵} simply calculates the number of divisors. This function is applied to all numbers from 1 to 2^d ¨⍳2*⍵. The resulting list is then searched for d itself (⍳⍵) which is the desired function f(d).


Is the bus load legal? I was in the bus today, and noticed this sign:

      seated    standing    wheelchairs
max1    37         30            00
max2    36         26            01
max3    34         32            00

The number of seated passengers, standees, and wheelchairs all have to be no larger than some row in the table. (See chat for details.)

For the purposes of this challenge we will generalise this idea: Given a non-negative integer list of a strictly positive length N (number of passenger types) and a non-negative integer matrix of strictly positive dimensions (N columns and one row per configuration, or the transpose of this), return a list of indices/truthy-falsies/two-unique-values indicating which configurations limits are fulfilled.

E.g. with the above matrix:
30,25,1 → [1] (0-indexed) [2] (1-indexed) or [false,true,false] (Boolean) or ["Abe","Bob","Abe"] (two unique values) etc.

The following test cases use the above matrix and the 0/1 for false/true:
[30,30,0] → [1,0,1]
[30,31,0] → [0,0,1]
[35,30,0] → [1,0,0]
[0,0,1] → [0,1,0]
[0,0,0] → [1,1,1]
[1,2,3] → [0,0,0]

The following test cases use the following matrix:
1 2 0 4
2 3 0 2

[1,2,1,2] → [0,0]
[1,3,0,1] → [0,1]
[1,2,0,3] → [1,0]
[1,2,0,1] → [1,1]

APL (Dyalog Unicode), 5 3 bytes

∧.≤

Try it online!


These Primes of Mine Are Always Solid Lines Let's create a N×N grid of spaces and underscores that can be used to visually determine if a number is prime. (N may be any positive integer.)
This grid has three simple rules:

The nth column contains the repeated pattern of n - 1 underscores followed by one space. This pattern starts at the first row and is stopped, possibly mid-pattern, at row N. (Rows and columns are 1-indexed.)
The first column is replaced with all underscores instead of all spaces.
If a space occurs somewhere the row index equals the column index it is replaced with an underscore.

Example: N = 10
           1
  1234567890 <-- column indices
 1__________
 2__________
 3__________
 4_ ________
 5__________
 6_  _______
 7__________
 8_ _ ______
 9__ _______
10_ __ _____
 ^ row indices

The indices are just for clarity. The plain grid itself (what your program must output) is:
__________
__________
__________
_ ________
__________
_  _______
__________
_ _ ______
__ _______
_ __ _____

Notice that:

The first column is all underscores.
The second column goes underscore space, underscore space, etc., except for the underscore on row 2.
The third column goes underscore underscore space, underscore underscore space, etc., except for the underscore on row 3.
etc.

Also notice that besides 1, only prime numbered rows have underscores in every column.
Since underscores span the entire font width, each prime numbered row forms a continuous solid line. So checking if a number is prime or not is quite easy visually; just check if its line is solid across all columns. (In fact looking up to the square root of the row index suffices but outputting that grid seems less elegant.)
Program
Write a program that will draw these grids given N via stdin (or closest alternative). Output goes to stdout (or closest alternative) and should only contain spaces, underscores, and newlines, with an optional trailing newline.
The shortest code wins.

CJam, 33 28 27 bytes

q~,:)_f{f{md\1=+'_S?}0'_tN}

Try it online.

How it works

q~        " Read one line from STDIN and evaluate it.                                     ";
,:)       " For “N”, push [ 1 ... N ].                                                    ";
_         " Push a copy.                                                                  ";
f{        " For each “I in [ 1 ... N ], push “I   [ 1 ... N ]”; then:                     ";
  f{      " For each “J in [ 1 ... N ], push “J   I”; then:                               ";
    md\   " Push “J % I   J / I”.                                                         ";
    1=+   " Calculate “J % I + (J / I == 1)”.                                             ";
    '_S?  " Push an underscore if the result is truthy and a space otherwise.             ";
  }       "                                                                               ";
  0'_t    " Replace the first character of the resulting array by an underscore.          ";
  N       " Push a newline.                                                               ";
}         "                                                                               ";

Example run

$ cjam solid-primes.cjam <<< 10
__________
__________
__________
_ ________
__________
_  _______
__________
_ _ ______
__ _______
_ __ _____
$ cjam solid-primes.cjam <<< 100 | md5sum # trailing newline
e4396b316989813dada21141b569ccf9  -


Fractal Points on a Line Sometimes, when I'm really bored (really bored), I like to draw a line segment and draw points on it.

First, I draw a line segment of a certain size, which is 2^N for some value of N.  The line will be represented by a series of . characters.

................

Then, I plot a point at the left end.  Points will be represented by X characters.

X...............

Then, I follow a pattern.  Starting at the most recently plotted point (which I'll call A), I advance to the next plotted point (B) on the line (wrapping around as necessary).  Then, I advance to the next plotted point on the line (C).  Then, I plot a new point half-way in between this third point (C) and the next already plotted point (D).

Whenever you wrap around the line, the "middle" is determined in wrapping manner.  The newly plotted point is always to the right of C.

Let's say that the following line was my current line.  Here is how I would plot the next two points.  For this example, I'll label each important point with a letter.

X...A...X.X...X.
    ^

X...A...B.X...X.
        ^

X...A...B.C...X.
          ^

X...A...B.C...D.
            ^

X...X...X.X.A.X.
            ^

X...X...X.X.A.B.
              ^

C...X...X.X.A.B.
^

C...D...X.X.A.B.
  ^

X.A.X...X.X.X.X.
  ^

Returning to the previous example, the next point will be plotted in the middle of the line.

X.......X.......

This is perhaps a little bit of a special case: advancing to the next point simply leaves you where you started.  The only useful halfway point is the "cyclic" halfway point (the halfway point on the line), as opposed plotting a point on top of itself.

Below is the series of points that I would plot on the line from here to the end.

X.......X.......
X.......X...X...
X.......X.X.X...
X...X...X.X.X...
X...X...X.XXX...
X.X.X...X.XXX...
X.X.X...XXXXX...

There is no longer any room to plot the next point, as it would have to be wedged between two adjacent points, so I have reached the maximum depth for the given value of N = 4.  The last line in the above list is "complete."

The Challenge

The goal is to write the shortest program/named function that will print/return the completed line for a given value of N.  The above shows N = 4.

Input

Input will be a single non-negative integer N.  The length of the generated line will then be 2^N.

Output

Output will be the completed line of length 2^N, formed by . and X characters.  A trailing newline doesn't matter.

Example I/O

0
X

1
XX

2
X.XX

3
X.X.XXX.

4
X.X.X...XXXXX...

5
X.X.X...X...X...X.XXX.XXX.......

Python 2, 137

n=input()
l=[0]*2**n;i=0
while~i%2:i=i/2%2**n;l[i]=1;i=sum([k for k,v in enumerate(l*4)if(k>i)*v][1:3])
print''.join(['.X'[x]for x in l])

Quite straightforward.

Pyth, 49

More or less a translation. Main difference is that I don't use a list representing the line, I use a string.

J*\.^2QW!%Z2K%/Z2lJ=JXJK\X=Zs<tf&q\X@JT>TKU*4J2)J

Try it online.

                         Q=input(); Z=0 #implicit
J*\.^2Q                  J = "."*(2^Q)
W!%Z2                    while !(Z%2):
  K%/Z2lJ                  K=(Z/2)%(len(J))
  =JXJK\X                  change J, the point at index K is changed to a "X"
       f          U*4J     filter all elements T in [0, 1, 2, ..., 4*len(J)-1]:
        &q\X@JT>TK           where J[T]=='X' and T>K
     <t               2    only us the second and third element
  =Zs                      and store the sum to Z
)J                       end while and print J


Never tell me the odds Input
A integer n ( ≥ 1) and a digit d (an integer such that 0 ≤ d ≤ 9).
In either order; from stdin or parameters or whatever; to a program or function; etc.
Output
The integers from 1 to n inclusive (in order) whose decimal representations contain an even number of ds. (That is, the integers in the list are the integers that have, respectively, an even number of ds.)
In any standard format, etc. In particular, the output need not be represented in decimal.
If output as a single string, the integers must be separated somehow (spaces, commas, newlines, null bytes, whatever).
Examples
in(d,n) ↦ out
1,12    ↦ 2 3 4 5 6 7 8 9 11
0,111   ↦ 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,111

Thanks
To quintopia for the title.

05AB1E, 11 10 bytes
Code:
\>GN¹¢ÈiN,

Explanation:
\           # Pop input, which saves the first input into ¹
 >          # Increment on second input
  G         # For N in range(1, input + 1)
   N        # Push N
    ¹       # Push the first input from the input register
     ¢      # Count the number of occurences of the digit in N
      È     # Is even?
       iN,  # If true, print N with a newline

Try it online
Uses CP-1252 encoding.


Steps of Permutation Write a function which takes a set of integers and prints every permutation of the set, and the swap performed in between each step

Input

a set of integers, for example (0, 1, 2)

Output

the list of permutations and swaps in the format
(set)
(swap)
(set)
...

Test case

Input:
(3, 1, 5)

Output:
(3, 1, 5)
(3, 1)
(1, 3, 5)
(3, 5)
(1, 5, 3)
(1, 3)
(3, 5, 1)
(3, 5)
(5, 3, 1)
(3, 1)
(5, 1, 3)

Rules

You can format the set of numbers however you want.
You can do the swaps in any order
You can repeat permutations and swaps in order to get a new one
Your code doesn't have to actually perform the swaps, the output just needs to show what swap was made between your last output and your current one
Your code only needs to function for sets with 2 or more elements
The set you're given will have no repeating elements (e.g. (0, 1, 1, 2) is invalid)

This is code-golf, so shortest code wins!

Java, 449 426 bytes

import java.util.*;interface P{static Set s=new HashSet();static void main(String[]a){o(Arrays.toString(a));while(s.size()<n(a.length)){p(a);o(Arrays.toString(a));}}static<T>void o(T z){System.out.println(z);s.add(z);}static int n(int x){return x==1?1:x*n(x-1);}static void p(String[]a){Random r=new Random();int l=a.length,j=r.nextInt(l),i=r.nextInt(l);String t=a[j];a[j]=a[i];a[i]=t;System.out.println("("+a[j]+","+t+")");}}

Brute force approach. It keeps making random swaps until all the possible permutations have took place. It uses a Set of the string representation of the array in order to check how many different states have been generated. For n different integers there are n! = 1*2*3*..*n distinct permutations.

Update

Followed Kevin Cruijssen's suggestions to golf it a bit more.

Ungolfed:

import java.util.*;

interface P {

    static Set<String> s = new HashSet<>();

    static void main(String[] a) {
        // prints the original input
        o(Arrays.toString(a));
        while (s.size() < n(a.length)) {
            p(a);
            // prints the array after the swap
            o(Arrays.toString(a));
        }
    }

    static void o(String z) {
        System.out.println(z);
        // adds the string representation of the array to the HashSet
        s.add(z);
    }

    // method that calculates n!
    static int n(int x) {
        if (x == 1) {
            return 1;
        }
        return x * n(x - 1);
    }

    // makes a random swap and prints what the swap is
    static void p(String[] a) {
        Random r = new Random();
        int l = a.length, j = r.nextInt(l), i = r.nextInt(l);
        String t = a[j];
        a[j] = a[i];
        a[i] = t;
        System.out.println("(" + a[j] + "," + t + ")");
    }
}

Usage:

$ javac P.java
$ java P 1 2 3
[1, 2, 3]
(2,1)
[2, 1, 3]
(1,1)
[2, 1, 3]
(2,2)
[2, 1, 3]
(3,1)
[2, 3, 1]
(3,1)
[2, 1, 3]
(1,2)
[1, 2, 3]
(1,1)
[1, 2, 3]
(3,2)
[1, 3, 2]
(2,3)
[1, 2, 3]
(3,1)
[3, 2, 1]
(3,1)
[1, 2, 3]
(3,3)
[1, 2, 3]
(1,2)
[2, 1, 3]
(1,3)
[2, 3, 1]
(1,2)
[1, 3, 2]
(3,1)
[3, 1, 2]

As you can see there are many more swaps than the necessary minimum. But it seems to work :-D

As a bonus, it works with strings too, i.e.

$ java P 'one' 'two'
[one, two]
(two,one)
[two, one]


Clearing the most significant bit from an integer Input
The input is a single positive integer n
Output
The output isn with its most significant bit set to 0.
Test Cases
1 -> 0
2 -> 0
10 -> 2
16 -> 0
100 -> 36
267 -> 11
350 -> 94
500 -> 244

For example: 350 in binary is 101011110. Setting its most significant bit (i.e. the leftmost 1 bit) to 0 turns it into 001011110 which is equivalent to the decimal integer 94, the output. This is OEIS A053645.

C (gcc), 49 44 40 39 bytes

i;f(n){for(i=1;n/i;i*=2);return n^i/2;}

Try it online!


Is it a valid number theory expression? A number theory expression contains:

There exists at least one non-negative integer (written as E, existential quantifier)
All non-negative integers (written as A, universal quantifier)
+ (addition)
* (multiplication)
= (equality)
>, < (comparison operators)
&(and), |(or), !(not)
(, ) (for grouping)
variable names(all lowercase letters and numbers, not necessary one char long)

However, it has some more limitations:

Arithmetic expressions should be syntactically valid. Here we only treat + as addition, not positive, so + and * should be surrounded by two number expressions
brackets should be well paired
< = > should be surrounded by two number expressions
& | ! are fed with logical expressions
E and A are fed with a variable and an expression
For E and A, there should be a reasonable affected range. (*)

For (*): We write Ax Ey y>x & y=x, Ax Ey y>x & Ey y=x as well as Ax Ey y>x & Ax Ey y=x, which mean Ax (Ey ((y>x) & (y=x))), Ax ((Ey (y>x)) & (Ey (y=x))) and (Ax (Ey (y>x))) & (Ax (Ey (y=x))); however we don't write Ax Ey Ax x=y or Ax Ey x<y & Ex x>y. That means there should be some way to add brackets, so everywhere any variable is at most defined for once, and anywhere that use the variable has it defined.

Input

You'll be given an expression with these chars (invalid chars won't appear), only split when necessary (two variable names together), split after each quantifier variable, or each symbols are separated. No invalid symbol.

Output

Check whether it's a valid number theory expression. Either true/false or multi/one are allowed.

True samples (each symbol separated)

E a E b a < b
E b A x b < x & A x b > x
E b A x b < x & b > x
A b b + b < ( b + b ) * b | E x x < b
E x E y y < x & E x2 y = x2
E 1 A x x * 1 = x & E 2 2 * 2 = 2 + 2 & 2 > 1 & E x x + 1 = x * x * 2
E x E y y = y & y + y * y = y

False samples

E a E b a + b < c
E a E b b * ( a > a ) + b
A a A b ( a = b ) = b
A x A y A z A y x < z
E x E y y < x & E x y = x
E E x x = x
E x ( x < x
E x = x

Undefined behavior samples

E C C = C
AA x x = x
Ex = x

Shortest code in bytes win

Symbol definition: It's a resexpr

numexpr({s},∅) = s
numexpr(a∪b,c∪d) = numexpr(a,c) + numexpr(b,d)
numexpr(a∪b,c∪d) = numexpr(a,c) * numexpr(b,d)
numexpr(a,c) = ( numexpr(a,c) )
boolexpr(a∪b,c∪d) = numexpr(a,c) = numexpr(b,d)
boolexpr(a∪b,c∪d) = numexpr(a,c) < numexpr(b,d)
boolexpr(a∪b,c∪d) = numexpr(a,c) > numexpr(b,d)
boolexpr(a∪b,c∪d) = boolexpr(a,c) & boolexpr(b,d)
boolexpr(a∪b,c∪d) = boolexpr(a,c) | boolexpr(b,d)
boolexpr(a,c) = ! boolexpr(a,c)
boolexpr(a,c) = ( boolexpr(a,c) )
boolexpr(a-{s},c∪{s}) = E s boolexpr(a,c) if s∉c
boolexpr(a-{s},c∪{s}) = A s boolexpr(a,c) if s∉c
resexpr = boolexpr(∅,a)
a,b,c,d mean sets, s mean non-empty strings containing a-z0-9

Notes

You don't need to check whether the expression is true, as it's usually impossible

APL (Dyalog Unicode), 318 317 319 bytesSBCS

∨/{(4=⊃⍵)>≢⊃1⌽⍵}¨{1=≢⍵:⍵⋄⊃,/(⊂⍵)∇{⊃,/,(⍺⍺⍵↑⍺)∘.{c←⊃¨⍺⍵⋄w←⊃,/⊃¨u v←1↓¨⍺⍵
(⊂c)∊t←↓10 2⍴⎕A⍳'AOBAJACKANEADMLDJDGK':⊂(2,u)(1w 0)(3,v)(1u 0)(5(⊃u)⍬)(4w⍬)(6,u)(4,v)(7,v)(4,u)⊃⍨t⍳⊂c
6 4≡c:⊂4,u,¨v
9 1≡c:(2⊃v)↑⊂8,v
8 4≡c:(a∊3⊃⍵)↓⊂4(a~⍨⊃v)((3⊃⍵),a←⊃u)
⍬}⍺⍺⍵↓⍺}¨⍳¯1+≢⍵}{⌈/c←(⊃⍵)∊¨¯1⌽'()!',↓4 3⍴' &|=<>+* AE':8+⊃⍸c⋄1(⊂⍵)1}¨' '(≠⊆⊢)⍞

Try it online!

-1 byte thanks to @Adám.

+2 bytes because the code wrongly accepted E ( a ) a = a. Fixed by adding a "simple" flag to the Num node, which is 1 right after tokenization but becomes 0 after any kind of merging. TQuant Num -> Quant rule is accepted only if "simple" is 1.

Full program. Takes a line of input (each symbol separated with a space) from stdin, and prints 1 if it can be parsed successfully, 0 otherwise.

How it works: the grammar & parsing

I manually dissected all the grammar rules into two-branch rules, e.g. the parenthesizing rule

"(" Num ")" -> Num

became two rules

"(" Num -> NumP
NumP ")" -> Num

with NumP being a new node type. Also, I omitted the last part of the Num node, as it is always an empty set.

(Num ids,?) [+*] -> (NumR ids)
(NumR ids) (Num ids2,?) -> (Num (ids+ids2),0)
"(" (Num ids,?) -> (NumP ids)
(NumP ids) ")" -> (Num ids,0)
(Num ids,?) [=<>] -> (BoolN ids,[])
(BoolN ids,ids3) (Num ids2,?) -> (Bool (ids+ids2),ids3)
(Bool ids,ids2) [&|] -> (BoolR ids,ids2)
(BoolR ids,ids3) (Bool ids2,ids4) -> (Bool (ids+ids2),(ids3+ids4))
"!" (Bool ids,ids2) -> (Bool ids,ids2)
"(" (Bool ids,ids2) -> (BoolP ids,ids2)
(BoolP ids,ids2) ")" -> (Bool ids,ids2)
[EA] (Num id,1) -> (Quant id)
(Quant id) (Bool ids,ids2) -> (Bool (ids-id),(ids2+id)) if id not in ids2

Using these rules, I could tackle the ambiguous parsing problem as follows:

Split the given list of tokens into two chunks.
Recursively get all possible parses for the two chunks.
Test all combinations of parses to gather all possible derived parses.
Repeat 1-3 for all possible splits, and gather all results.

The algorithm is exponential in the number of tokens, so the two longest test cases are excluded from the tests.

Original version with comments

⍝ Constants to classify the grammar node type
Num NumR NumP Bool BoolN BoolR BoolP Quant TQuant TParenL TParenR TNot TBool2 TCmp TNum2←⍳15

⍝ Split given string by spaces, and convert to a list of grammar nodes
tokenize←{
  words←(' '∘≠⊆⊢)⍵  ⍝ split by spaces
  {
    class←(⊃⍵)∊¨'AE' '(' ')' '!' '&|' '=<>' '+*'
    ⌈/class: 8+⊃⍸class  ⍝ Single-char tokens into respective nodes
    Num(⊂⍵)1  ⍝ An identifier is a Num node
  }¨words  ⍝ wrap each word into tokens
}

⍝ Takes two nodes, and gives a new node if valid, ⍬ otherwise
match←{
  class←⊃¨⍺⍵
  Num TNum2≡class: ⊂NumR(2⊃⍺)
  NumR Num≡class: ⊂Num((2⊃⍺),2⊃⍵)0
  TParenL Num≡class: ⊂NumP(2⊃⍵)
  NumP TParenR≡class: ⊂Num(2⊃⍺)0
  Num TCmp≡class: ⊂BoolN(2⊃⍺)⍬
  BoolN Num≡class: ⊂Bool((2⊃⍺),2⊃⍵)⍬
  Bool TBool2≡class: ⊂BoolR(2⊃⍺)(3⊃⍺)
  BoolR Bool≡class: ⊂Bool((2⊃⍺),2⊃⍵)((3⊃⍺),3⊃⍵)
  TNot Bool≡class: ⊂Bool(2⊃⍵)(3⊃⍵)
  TParenL Bool≡class: ⊂BoolP(2⊃⍵)(3⊃⍵)
  BoolP TParenR≡class: ⊂Bool(2⊃⍺)(3⊃⍺)
  ⍝ Valid only if "simple" flag of Num node is 1
  TQuant Num≡class: (3⊃⍵)↑⊂Quant(2⊃⍵)
  ⍝ Valid only if quantified variable is not already quantified
  Quant Bool≡class: (~(2⊃⍺)∊3⊃⍵)↑⊂Bool((2⊃⍵)~2⊃⍺)((3⊃⍵),2⊃⍺)
  ⍬
}

⍝ Given a list of tokens, returns an array of possible parses
⍝ Split in all possible ways and check for at least one split is valid
parse←{
  ⍝ Single token: no need to parse
  1=≢⍵:⍵
  splits←⍳¯1+≢⍵
  ⍝ Concatenate parses based on all possible splits
  ⊃,/(⊂⍵)∇{
    left←⍺⍺ ⍵↑⍺
    right←⍺⍺ ⍵↓⍺
    ⍝ Test all possible combinations of left/right parses
    ⊃,/,left ∘.match right
  }¨splits
}

⍝ Test if one of the parses is Bool with no free variables
test←{
  ∨/{
    Bool≠⊃⍵:0
    0=≢2⊃⍵
  }¨⍵
}

⍝ The solution is the chain of three functions defined above
test∘parse∘tokenize

Try it online!


Smallest positive integer not yet appeared so that the sum of the first n elements is divisible by n Task

Given positive integer n, output a(n) where a is the sequence defined below:

a(n) is the smallest positive integer not yet appeared so that the sum of the first n elements in the sequence is divisible by n.

Example

a(1) is 1 because it is the smallest positive integer that has not appeared in the sequence, and 1 is divisible by 1.
a(10) is 16 because look at the first nine elements: 1,3,2,6,8,4,11,5,14. They sum up to 54, so for the first ten elements to sum up to a multiple of 10, a(10) would need to have a remainder of 6 when divided by 10. 6 has already appeared, so a(10) is 16 instead.

Testcases

n     a(n)
1     1
2     3
3     2
4     6
5     8
6     4
7     11
8     5
9     14
10    16
11    7
12    19
13    21
14    9
15    24
16    10
17    27
18    29
19    12
20    32
100   62
1000  1618
10000 16180

a(n) from n=1 to n=10000

References

OEIS A019444

Python 2, 43 bytes
r=.5+5**.5/2
lambda n:[n/r+1,n*r][n%r<1]//1

Outputs floats. Uses the relation

a(n) = A002251(n-1) + 1

to Wythoff pairs. Takes from the upper or lower Beatty sequence by multiplying or dividing by the golden ratio and converting to an integer.


Implement lazy lists, preferably in a language you don't know well This is a nice exercise for becoming more fluent in that programming language you've been meaning to learn, but have only tinkered with lightly.  This involves working with objects, using or simulating closures, and stretching the type system.

Your task is to write code to manage lazy lists, then use it to implement this algorithm for generating Fibonacci numbers:

Code samples are in Haskell

let fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
 in take 40 fibs

Result:

[0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986]

Your lazy list implementation should meet these guidelines:

A List node is one of three things:

Nil - Empty list.
   []
Cons - A single item, paired with a List of the remaining items:
    1 : [2,3,4,5]
    (: is the cons operator in Haskell)
Thunk - A deferred computation that produces a List node when needed.

It supports the following operations:

nil - Construct an empty list.
cons - Construct a cons cell.
thunk - Construct a Thunk, given a function that takes no arguments and returns a Nil or Cons.
force - Given a List node:

If it's a Nil or Cons, simply return it.
If it's a Thunk, call its function to get a Nil or Cons.  Replace the thunk with that Nil or Cons, and return it.
Note: Replacing the thunk with its forced value is an important part of the definition of "lazy".  If this step is skipped, the Fibonacci algorithm above will be too slow.

empty - See if a List node is Nil (after forcing it).
head (a.k.a. "car") - Get the first item of a list (or throw a fit if it's Nil).
tail (a.k.a. "cdr") - Get the elements after the head of a list (or throw a fit if it's Nil).
zipWith - Given a binary function (e.g. (+)) and two (possibly infinite) lists, apply the function to corresponding items of the lists.  Example:
zipWith (+) [1,2,3] [1,1,10] == [2,3,13]
take - Given a number N and a (possibly infinite) list, grab the first N items of the list.
print - Print all the items in a list.  This should work incrementally when given a long or infinite list.

fibs uses itself in its own definition.  Setting up lazy recursion is a tad tricky; you'll need to do something like this:

Allocate a thunk for fibs.  Leave it in a dummy state for now.
Define the thunk function, which depends on a reference to fibs.
Update the thunk with its function.

You may want to hide this plumbing by defining a function fix which calls a List-returning function with its own return value.  Consider taking a short nap so this idea can set in.
Polymorphism (the ability to work with lists of any type of item) is not required, but see if you can find a way to do it that's idiomatic in your language.
Don't worry about memory management.  Even languages with garbage collection have a tendency to carry around objects you'll never use again (e.g. on the call stack), so don't be surprised if your program leaks memory while traversing an infinite list.

Feel free to deviate slightly from these guidelines to accommodate the particulars of your language, or to explore alternative approaches to lazy lists.

Rules:

Pick a language you don't know well.  I can't "require" this, hence the "honor-system" tag.  However, voters can check your history to see what languages you've been posting in.
Don't use your language's built-in lazy list support to do everything.  Post something substantial or at least interesting.

Haskell is pretty much out.  That is, unless you do something like this:

data List a = IORef (ListNode a)
data ListNode a = Nil | Cons !a !(List a) | Thunk !(IO (ListNode a))

Note: Haskell's non-strict evaluation isn't off-limits, but your lazy list implementation shouldn't derive its capability directly from there.  In fact, it'd be interesting to see an efficient, purely functional solution that doesn't require laziness.
Python:

Don't use itertools.
Generators are fine, but you use them, you'll have to find some way to memoize forced values.

C

I am a total beginner in C, this code is actually the first real thing I coded in C. It compiles without any warnings and runs fine on my system.

How to build

First, get the tarball from my server. It includes a makefile, so just run make to build it and then make run to run it. The program then prints a list of the first 93 fibonacci numbers. (After number 94, an unsigned 64 bit integer overflows)

Explanation

The programs core is the file lazy-list.c. In the corresponding header file, I define a struct list, that is our lazy list. It looks like this:

enum cell_kind {
  NIL,
  CONS,
  THUNK
};

typedef enum cell_kind cell_kind;

typedef long int content_t;

struct list {
  cell_kind kind;
  union {
    struct {
      content_t* head;
      struct list* tail;
    } cons;
    struct {
      struct list* (*thunk)(void*);
      /* If you want to give arguments to the thunk, put them in here */
      void* args;
    } thunk;
  } content;
};

The member kind is kind of a tag. It marks, whether we reched the lists end (NIL), a cell that is already evaluated (CONS) or a thunk (THUNK). Then, there follows a union. It is

either an already evaluated cell with a value and a tail
or a thunk, featuring a function-pointer and a struct, that may contain some arguments to the function, if needed.

The content of the union is asserted by the tag. If the tag is NIL, the content of the union is undefined.

By defining the helper functions mentioned in the specification above, one can usually abstract the lists definition from it's usage, eg. you can simply call nil() to get an empty list instead of creating one by yourself.

The three most interesting functions are zipWith, take and fibonaccis. But I don't want to explain take, since it is very similar to zipWith. All functions, that operate lazily, have three components:

A wrapper, that creates a thunk
A worker, that performs the calculations for one cell
A struct, that keeps the arguments

In case of zipWith, these are zipWith, __zipWith and __zipArgs. I just show them here without any further explanation, there function should be quite clear:

struct __zipArgs {
  content_t* (*f)(content_t*,content_t*);
  list* listA;
  list* listB;
};

static list* __zipWith(void* args_) {
  struct __zipArgs* args = args_;
  list* listA = args->listA;
  list* listB = args->listB;
  list* listC;

  content_t* (*f)(content_t*,content_t*) = args->f;
  content_t* headA = head(listA);
  content_t* headB = head(listB);
  content_t* headC;

  if (NULL == headA || NULL == headB) {
    free(args);
    return nil();
  } else {
    headC = f(headA, headB);
    args->listA = tail(listA);
    args->listB = tail(listB);
    listC = thunk(__zipWith,args);
    return cons(headC,listC);
  }
}

list* zipWith(content_t* (*f)(content_t*,content_t*),list* listA, list* listB) {
  struct __zipArgs* args = malloc(sizeof(struct __zipArgs));
  args->f = f;
  args->listA = listA;
  args->listB = listB;
  return thunk(__zipWith,args);
}

The other interesting function is fibonaccis(). The problem is, that we need to pass a pointer of the first and second cell to the thunk of the third, but in order to create those cells we also need a pointer to the thunk. To solve that problem, I filled the pointer to the thunk with a NULL first and changed it into the thunk, after it was created. Here is the listening:

static content_t* __add(content_t* a,content_t* b) {
  content_t* result = malloc(sizeof(content_t));
  *result = *a + *b;
  return result;
}

list* fibonaccis() {
  static content_t one_ = 1;
  static content_t zero_ = 0;
  list* one  = cons(&one_,NULL);
  list* two  = cons(&zero_,one);
  list* core = zipWith(__add,one,two);
  one->content.cons.tail = core;
  return two;

Possible improvements

My solution does not use polymorphism. Although possibly possible, my C skills are not sufficient to know how to use it. Instead, I used a type content_t, that one can change to whatever fits.
One could extract the thunk out of the list's defintion and using it only abstractly, but doing so would make the code more complicated.
One could improve the parts of my code that aren't good C.


Nightmare Puzzlang translator Background

Puzzlang is a derivative of Brainfuck, where the symbol X executes a BF command based on three characters on top of it, and anything else does nothing.

The following is the translation table for Puzzlang, where X is the literal X and . stands for anything else:

 >      <      +      -      .      ,      [      ]

..X    X..    XXX    ...    .X.    X.X    XX.    .XX
 X      X      X      X      X      X      X      X

Also, the entire source code wraps around both horizontally and vertically at the translation step. For example, the following code is an infinite loop:

XX X

since you can view the code like this (the dots are where the wrapped X's would go)

... ..
.XX X.

and matching with the translation table gives +[] for the three X's in order.

Nightmare Puzzlang is an evil twin of the regular Puzzlang. In Nightmare Puzzlang, each X translates into a byte based on its eight neighbors. Any non-X characters translate into nothing. The wrapping rule is the same.

Since there is no "official" specification, let's assume that the following pattern (where X denotes the one to translate)

abc
dXe
fgh

translates to abcdefgh in binary (X is one, non-X is zero). Then the following code

XX...
X..X.
X..XX
X..XX
X.XX.

translates to 4a b4 66 03 56 4b bf d2 6e fd c3 2c 70 in hex, or J´fVK¿ÒnýÃ,p as a string. Note that the resulting string will very likely have ASCII unprintables.

Task

Translate the given Nightmare Puzzlang code into a string.

Input & output

For input, you can take 2D array of chars, list of strings, or a single string whose lines are delimited by newlines. You can assume that the input is rectangular in shape, i.e. row lengths are equal.

For output, you can give a single string, a list of chars, or a list of charcodes.

Test Cases

Note that the result must remain the same when any of the dots are replaced with anything else other than the capital X.

X (1 row, 1 column)
String: ÿ
Charcode: [255]

X. (1 row, 2 columns)
String: B
Charcode: [66]

X
. (2 rows, 1 column)
String:
Charcode: [24]

X.
.X
String: ¥¥
Charcode: [165, 165]

X.X
.X.
String: 1Œ¥
Charcode: [49, 140, 165]

X.X
XX.
X.X
String: ÓmÎµv«
Charcode: [211, 109, 206, 181, 118, 171]

X.XX.XXX..XXXX.
String: BkÖkÿÖkÿÿÖ
Charcode: [66, 107, 214, 107, 255, 214, 107, 255, 255, 214]

X.XX.XXX.XXXXX.
XX.X..XX....X..
String: cR){Ö9Z”JµÆïÖç
Charcode: [99, 173, 82, 41, 123, 214, 8, 24, 57, 90, 148, 74, 181, 198, 239, 214, 231]

X
X
X
.
.
X
.
X
X
.
X
String: ÿÿøø
Charcode: [255, 255, 248, 24, 31, 248, 31]

XX
X.
XX
.X
.X
XX
..
XX
XX
..
.X
String: º]ç]ºâG¸Xøø
Charcode: [186, 93, 231, 93, 186, 226, 71, 184, 88, 31, 31, 248, 248, 7]

XX XXX XX  XX
X  X X X X X
X  X X X X XX
X  X X X X X
XX XXX XX  XX

XXX XXX X  XX
X   X X X  X
X X X X X  XX
X X X X X  X
XXX XXX XX X
(11 rows, 13 columns, no extra padding, result has two newlines)
zôª}òªuJ½æbÂb‚cRBBBBJ½ÇCFCDcX�H¸PH°H¸

æbÂBcRBBBJ½ÃFCFCbO¾UO¾UN”C
Charcode: [122, 244, 170, 125, 242, 170, 117, 74, 189, 230, 98, 194, 98, 130, 99, 82, 66, 66, 66, 66, 74, 189, 199, 67, 70, 67, 68, 99, 88, 144, 72, 184, 80, 72, 176, 72, 184, 26, 28, 16, 10, 29, 18, 2, 10, 29, 230, 98, 194, 66, 99, 82, 2, 66, 66, 66, 74, 189, 195, 70, 67, 70, 67, 98, 79, 190, 85, 79, 190, 85, 78, 148, 67]

Rules

Standard code-golf rules apply. The shortest submission in bytes wins.

APL (Dyalog Unicode), 57 bytes

¯1~⍨,1↓∘⍉∘⌽⍣4⊢{2 2⌷⍵:2⊥(~¯9↑5↑1)/,⍵⋄¯1}⌺3 3⊢⍉∘(¯1∘↑⍪⊢⍪1∘↑)⍣2⊢'X'=⎕

Try it online!
A full program which takes a binary matrix through STDIN, returns an array of codepoints.
Explanation
x¯1~⍨,1↓∘⍉∘⌽⍣4⊢{2 2⌷⍵:2⊥(~¯9↑5↑1)/,⍵⋄¯1}⌺3 3⊢⍉∘(¯1∘↑⍪⊢⍪1∘↑)⍣2⊢'X'=⎕
⎕ take input
'X'=  boolean matrix where 'X's are 1s
⍉∘(...)⍣2⊢ do the following twice:
¯1∘↑⍪⊢⍪1∘↑ pad each row with its wraparound on both sides
⍉∘ and transpose
{...}⌺3 3⊢ then, do the following for each 3x3 window:
2 2⌷⍵: if the middle element is 1:
2⊥(~¯9↑5↑1)/,⍵ decode the rest of the window as binary
⋄¯1 Otherwise, return ¯1.
⍣4⊢ Do the following 4 times:
1↓∘⍉∘⌽ rotate 90°, drop first row (remove the border cells)
, flatten into a simple array
¯1~⍨ remove all ¯1s


All squares that match a wildcard sequence This was inspired by part of the 2016 ARML competition Team Problem #6.

Here's the challenge:

You're given a "wildcard sequence", which is a sequence of digits and another character. A string matches this wildcard sequence by the following pseudocode:

w = wildcard
s = string
# s matches w iff
for all 0 >= i > wildcard.length, w[i] == '?' or s[i] == w[i]

Where '?' is a character of your choice.

In terms of regex, just imagine the '?' to be '.'.

The challenge is to find all square numbers (the requirement is up to 1 million) whose decimal string representations match this wildcard sequence. The "wildcard character" can be any ASCII character of your choice, as long as it isn't a digit, obviously.

For example, 4096 matches 4**6 and 4*9* but 4114 does not match either.

Input

Input will be given as a sequence matching the regex [0-9?]+. This can be a string, a character array, or a byte array of the characters in ASCII.

Output

Output will be a whatever-you-want-delimited list/set/array of numbers which are perfect squares and match the wildcard sequence.

Examples of valid inputs:

1234567*90
1234567?90
1234567u90
['1', '2', '3', '4', '5', '6', '7', '*', '9', '0']
[49, 50, 51, 52, 53, 54, 55, 42, 57, 48]
[1, 2, 3, 4, 5, 6, 7, '*', 9, 0]

Examples of valid outputs:

[1, 4, 9]
1 4 9
1, 4, 9
1-4-9

etc.

Specifications

You may not use builtins for finding a list of squares in a certain range
Standard Loopholes Apply
You must be able to handle up to 1 000 000 (1 million)
If provided with the input 1******, it is correct to print [1000000]. It is also correct to print [1000000, 1002001, 1004004, 1006009, 1008016, 1010025, ...]
Wildcard sequences will never start with the wildcard character; that is, they will always match strings of the same length.

Test Cases

4**6  ->  [4096, 4356]
1**1  ->  [1521, 1681]
1**  ->  [100, 121, 144, 169, 196]
9****9  ->  [908209, 915849, 927369, 935089, 946729, 954529, 966289, 974169, 986049, 994009]
9*9***  ->  [919681, 929296]
1**0*  ->  [10000, 10201, 10404, 10609, 12100, 14400, 16900, 19600]
9***4  ->  [91204, 94864, 97344]

Winning

Shortest (valid) (working) submission by February 14th, tie-break by earliest submission winning.

Mathematica, 44 bytes
Print@@@IntegerDigits[Range@1*^3^2]~Cases~#&

The input is a list of digits with a _ (no quotes) as a wildcard. e.g. {4, _, _, 6}
Explanation
Range@1*^3

Generate list {1, 2, 3, ... , 1000}
... ^2

Square it. (list of all squares from 1 to 1,000,000)
IntegerDigits[ ... ]

Split each square into a list of digits.
... ~Cases~#

Find the ones that match the pattern specified by the input.
Print@@@ ...

Print them.


Proving you are the best StackExchange-User Write one/two program(s)/function(s):

The first one should return a truthy value if given your Stack Exchange username.

~~Optional~~

An obfuscated one (as explained below) that does the same thing.

Rules for number 2:

May be no more than ten times the byte-count of number 1 or 100 bytes, whichever is higher.
Must be written in the same language as number 1.

Test cases
(for my case:)
input        output
-------------------
Seims        true
BestCoderXX  false

Winning
This is code-golf, so shortest byte count for number one wins.