login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A277812
a(n) = the first odious number encountered when starting from k = n and iterating the map k -> A003188(A006068(k)/2).
3
1, 2, 1, 4, 2, 1, 7, 8, 4, 2, 11, 1, 13, 14, 7, 16, 8, 4, 19, 2, 21, 22, 11, 1, 25, 26, 13, 28, 14, 7, 31, 32, 16, 8, 35, 4, 37, 38, 19, 2, 41, 42, 21, 44, 22, 11, 47, 1, 49, 50, 25, 52, 26, 13, 55, 56, 28, 14, 59, 7, 61, 62, 31, 64, 32, 16, 67, 8, 69, 70, 35, 4, 73, 74, 37, 76, 38, 19, 79, 2, 81, 82, 41, 84, 42, 21, 87, 88, 44, 22, 91, 11, 93, 94, 47, 1, 97, 98, 49, 100
OFFSET
1,2
FORMULA
If A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = n, otherwise a(n) = a(A003188(A006068(n)/2)).
Other identities:
a(n) = A000069(A277813(n)).
If A010060(n) = 0 [when n is one of the evil numbers, A001969], then a(n)= a(A000265(n)) [the trailing zeros in binary expansion of n do not affect the result].
For all n >= 1, a(A000069(n)) = A000069(n). [By definition].
For all n > 1, a(A001969(n)) < A001969(n).
PROG
(Scheme, with memoization-macro definec)
(definec (A277812 n) (if (= 1 (A010060 n)) n (A277812 (A003188 (/ (A006068 n) 2)))))
CROSSREFS
Cf. A277808 (gives the number of such iterations needed to reach a(n) from n).
Cf. A003945 (the positions of 1's in this sequence).
Sequence in context: A239829 A210034 A074586 * A134586 A135287 A359803
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 03 2016
STATUS
approved