OFFSET
1,4
COMMENTS
For related sequences, see notes in the Mathematica program.
The asymptotic density of the occurrences of k = 0, 1 and 2 is 1/2, 1/3 and 1/6, respectively. The asymptotic mean of this sequence is 2/3. - Amiram Eldar, May 31 2024
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
From Jianing Song, May 30 2024: (Start)
Recurrence: a(2n-1) = 0, a(2n) = 1, 2, 1 for a(n) = 0, 1, 2 respectively.
a(n) = 0 for odd n; a(n) = 1 for even n such that v2(n) is odd; a(n) = 2 for even n such that v2(n) is even, where v2(n) = A007814(n) is the 2-adic valuation of n. (End)
MATHEMATICA
PROG
(PARI) A191254(n) = if(n%2, 0, if(valuation(n, 2)%2, 1, 2)); \\ Antti Karttunen, Nov 06 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 28 2011
STATUS
approved