The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292245 Base-2 expansion of a(n) encodes the steps where numbers of the form 3k+1 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n. 8
1, 2, 2, 5, 4, 4, 11, 4, 8, 17, 10, 18, 9, 8, 22, 17, 8, 8, 17, 22, 36, 41, 8, 42, 17, 16, 44, 21, 34, 32, 35, 20, 32, 33, 36, 64, 69, 18, 34, 73, 16, 74, 37, 44, 82, 33, 34, 34, 89, 16, 64, 69, 16, 68, 65, 34, 64, 33, 44, 64, 33, 72, 16, 65, 82, 68, 85, 16, 128, 137, 84, 72, 69, 34, 138, 145, 32, 84, 145, 88, 88, 149, 42, 162, 65, 68, 164, 45, 64 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = 2*a(A253889(n)) + [n ≡ 1 (mod 3)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 3k+1, and 0 otherwise.
a(n) = A289813(A292243(n)).
Other identities. For all n >= 1:
a(A048673(n)) = A292248(n).
a(n) + A292244(n) = A064216(n).
a(n) AND A292244(n) = a(n) AND A292246(n) = 0, where AND is a bitwise-AND (A004198).
EXAMPLE
For n=1 (the termination value of the iteration), 1 is of the form 3k+1, thus a(1) = 1*(2^0) = 1.
For n=2, 2 is not of the form 3k+1, while A253889(2) = 1 is, thus a(2) = 0*(2^0) + 1*2(^1) = 2.
For n=4, 4 is of the form 3k+1, while A253889(4) = 2 is not, but then A253889(2) = 1 again is, thus a(4) = 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; Map[FromDigits[#, 2] &[IntegerDigits[#, 3] /. 2 -> 0] &, Array[a, 98]] (* Michael De Vlieger, Sep 16 2017 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A292245 n) (if (= 1 n) 1 (+ (if (= 1 (modulo n 3)) 1 0) (* 2 (A292245 (A253889 n))))))
CROSSREFS
Sequence in context: A025498 A193693 A128971 * A206427 A335690 A330026
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 15 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 18:22 EDT 2024. Contains 372494 sequences. (Running on oeis4.)