# Tag Info

### Print some JSON

Python 2, 14 bytes print{str:1} Outputs: {"<type 'str'>": 1} The backticks get the string representation in Python ...

### Print all integers

Haskell, 19 bytes do n<-[1..];[1-n,n] Produces the infinite list [0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7... Haskell allows ...

### Print some JSON

jq, 6 characters (3 characters code + 3 characters command-line option.) env CW because I am sure this is not the kind of answer you intended to allow. Sample ...

### Write a program whose nontermination is independent of Peano arithmetic

Haskell, 838 bytes “If you want something done, …” ...

### Print some JSON

Jelly, 11 bytes “Ɠɼ'ẸẠḌȷżÑ» Try it online! Output {"Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch":0}

### Put together a Senate majority

Bubblegum, 165 164 163 162 161 160 bytes ...

### Print all integers

Brainfuck, 6 bytes This makes use of the cell wrapping and prints all possible values. In Brainfuck, the native integer representation is by byte value. .+[.+] Try ...

### Print all integers

Cubix, 14 12 bytes .(.\OSo;?.>~ Test it online! You can now adjust the speed if you want it to run faster or slower. How it works The first thing the ...

### What an Odd Function

Jelly, 7 bytes Æf^<¥4P Swaps 2s and 3s in the input's prime factorization. The probability of odds is 2/3. Try it online! How it works ...

### Egyptian fraction representations of 1

Python 2, 42 bytes f=lambda n,x=1:1/n*[x]or[x+1]+f(n-1,x*-~x) Try it online! The key thing to observe is that ...

### Infinitely many ℕ

Scratch 3.0, 13 20 blocks/121 70 bytes As SB Syntax: define(n)(i say(i ((n)+<(i)=(n)>)((1)+((i)*<(i)<(n This says each term in the sequence. A delay ...

### Give me odd, even, square, cube, prime and composite 3-digit numbers

Python 2, 25 22 bytes lambda s:hash(s)%591^1 Try it online! Takes input in upper case and returns the following numbers: ...
Accepted

### Print all integers

Sesos, 113 3 bytes 0000000: c4ceb9 ... Try it online! Check Debug to see the generated SBIN code. Sesos assembly The ...
Accepted

### Demonstrate some advanced abstract algebra

Proof of impossibility The only anti-distributive operator when $S=\mathbb Z$ is such that $\forall a, \forall b, a*b=0$. Indeed, suppose that $*$ is anti-distributive. Then $*$ has the ...

### Print all integers

Python 2, 27 bytes n=0 while 1:print~n,n,;n+=1 Prints -1 0 -2 1 -3 2 -4 3 ...

### Print all integers

MATL, 8 bytes 0`@_@XDT This uses MATL's default data type, which is double, so it works up to ...

### Print all integers

Shakespeare Programming Language, 227 bytes ...

### Print some JSON

Notepad, 7 keystrokes If you have a Windows computer with the Notepad program, type this: {"F5":0} On my Windows 7 computer, at least, this gives you something like: ...

### f(g(x)) decreases while g(f(x)) increases

Python, 68 characters f=lambda x:(1-x%2*2)*(2*x*x+(x<0)) g=lambda x:(1-x%2*2)*(2*x*x+(x>0)) f maps negative numbers to odd numbers and positive numbers to ...

### Bijective function ℤ → ℤⁿ

Alice, 14 12 bytes /O \i@/t&Yd& Try it online! Inverse function (not golfed): /o Q \i@/~~\ /dt&Z Try it ...

### Infinitely many ℕ

Husk, 2 bytes ḣN Try it online! First Husk answer! Also uses the sequence in the question How it works ...

### Injection from two strings to one string

brainfuck, 30 29 27 23 bytes ,[-[+.>]-[>+<---]>.-.,] Try it online! Inputs are separated by a 0x01 byte. This ...

### Print some JSON

Java (JDK 10), 20 bytes v->"{\"\":"+1/.3+"}" Try it online! Output {"":3.3333333333333335}

### Golf a bijection within the natural numbers which map the primes to a proper subset of the primes

Mathematica, 54 48 bytes ±(t=x_?PrimeQ)=NextPrime@x ±n_:=Abs[n-1]/.t:>x-1 Defines the following bijection: ...

### Enumerate all pure sets

Python, 43 bytes f=lambda x:[f(i)for i in range(x)if x>>i&1] Attempt This Online! Outputs the $n$th set, starting at $0$. One way of creating a sequence of all pure sets is to encode ...

### f(g(x)) decreases while g(f(x)) increases

CJam (17 bytes) Function f (named F because CJam only allows upper-case names): {W1\$2b,#*}:F Function g (anonymous): ...