|
|
A292244
|
|
Base-2 expansion of a(n) encodes the steps where multiples of 3 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n.
|
|
9
|
|
|
0, 0, 1, 0, 0, 3, 0, 2, 5, 0, 0, 1, 0, 0, 1, 12, 6, 7, 14, 0, 1, 0, 4, 1, 8, 10, 3, 0, 0, 21, 24, 0, 1, 28, 2, 3, 2, 0, 1, 0, 0, 5, 2, 2, 1, 22, 24, 17, 0, 12, 33, 32, 14, 35, 42, 28, 45, 24, 0, 1, 16, 2, 11, 48, 0, 59, 0, 8, 3, 0, 2, 5, 0, 16, 1, 4, 20, 3, 6, 6, 7, 8, 0, 1, 56, 0, 3, 0, 42, 5, 0, 48, 5, 0, 0, 1, 14, 2, 65, 64, 56, 49, 44, 4, 49, 64, 6, 57, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 1:
|
|
EXAMPLE
|
For n = 3, the starting value is a multiple of three, after which follows A253889(3) = 1, the end point of iteration, which is not a multiple of three, thus a(3) = 1*(2^0) = 1.
For n = 8, the starting value is not a multiple of three, after which follows A253889(8) = 3, which is, thus a(8) = 0*(2^0) + 1*(2^1) = 2.
For n = 9, the starting value is a multiple of three, after which follows A253889(9) = 8 (which is not), while A253889(8) = 3 (which is), thus a(9) = 1*(2^0) + 0*(2^1) + 1*(2^2) = 5.
|
|
MATHEMATICA
|
f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; Table[FromDigits[#, 2] &@ Map[Boole[Divisible[#, 3]] &, Reverse@ NestWhileList[Floor@ g[Floor[f[#]/2]] &, n, # > 1 &]], {n, 109}] (* Michael De Vlieger, Sep 16 2017 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|