[go: up one dir, main page]

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”).

A227616
Number of bits set to 1 in the binary representation of the n-th term of the Lucas-Lehmer sequence (A003010).
1
1, 3, 3, 5, 12, 30, 58, 128, 237, 476, 975, 1956, 3899, 7798, 15534, 31270, 62262, 124635, 248944, 497797, 995730, 1990576, 3983767, 7969049, 15935289, 31870309, 63739461, 127519282, 254994762, 510016513, 1020092276, 2040066241, 4080236749
OFFSET
0,2
FORMULA
a(n) = A000120(A003010(n)).
EXAMPLE
For n = 2, A003010(2) = 11000010 (in binary), so a(2) = 3.
MAPLE
read("transforms") :
A227616 := proc(n)
wt(A003010(n)) ;
end proc: # R. J. Mathar, Jul 20 2013
MATHEMATICA
First@ DigitCount[#, 2] & /@ NestList[#^2 - 2 &, 4, 28] (* Michael De Vlieger, Apr 04 2016 *)
PROG
(PARI) lista(nn) = {a = 4; print1(hammingweight(a), ", "); for (n=1, nn, a = a^2-2; print1(hammingweight(a), ", "); ); } \\ Michel Marcus, Apr 04 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Olivier de Mouzon, Jul 17 2013
EXTENSIONS
Terms from a(19) on from Michel Marcus, Apr 04 2016
STATUS
approved