OFFSET
0,2
COMMENTS
Note the indexing: the domain includes zero, but the range starts from one.
LINKS
FORMULA
MATHEMATICA
f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Table[f[BitXor[n, Floor[n/2]], 1, 1], {n, 0, 74}] (* Michael De Vlieger, May 09 2017 *)
PROG
(Python)
from sympy import prime
import math
def A(n): return n - 2**int(math.floor(math.log(n, 2)))
def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
def a005940(n): return b(n - 1)
def a003188(n): return n^int(n/2)
def a243353(n): return a005940(1 + a003188(n)) # Indranil Ghosh, May 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 05 2014
STATUS
approved