OFFSET
1,2
LINKS
FORMULA
a(1) = 1, after which for even n, a(n) = 2*a(n/2), for odd n, a(n) = 1 + 2*a(A064989(n-2)).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = If[EvenQ@ n, 2 a[n/2], 1 + 2 a[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[(n - 1) - 1]]]; Table[a@ n, {n, 83}] (* Michael De Vlieger, Mar 23 2016 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved