|
|
A120738
|
|
a(n) = 4*n - A000120(n).
|
|
10
|
|
|
0, 3, 7, 10, 15, 18, 22, 25, 31, 34, 38, 41, 46, 49, 53, 56, 63, 66, 70, 73, 78, 81, 85, 88, 94, 97, 101, 104, 109, 112, 116, 119, 127, 130, 134, 137, 142, 145, 149, 152, 158, 161, 165, 168, 173, 176, 180, 183, 190, 193, 197, 200, 205, 208, 212, 215, 221, 224, 228
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
a(n) is also the increasing sequence of exponents of x in Product_{k > 1} (1 + x^(2^k - 1)). - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
|
|
LINKS
|
|
|
FORMULA
|
a(n) = log_2(16^n/A001316(n)). [This was the original definition.]
|
|
MAPLE
|
a:=n->simplify(log[2](16^n/(add(modp(binomial(n, k), 2), k=0..n))));
a:=n->simplify(log[2](16^n/(2^(n-(padic[ordp](n!, 2)))))); # Note: n-(padic[ordp](n!, 2)) is the number of 1's in the binary expansion of n. - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) {a(n) = if( n < 0, 0, 4*n - subst( Pol( binary( n ) ), x, 1) ) } /* Michael Somos, Aug 28 2007 */
(PARI) a(n) = 4*n - hammingweight(n); \\ Michel Marcus, Nov 06 2016
(Sage)
A120738 = lambda n: 4*n - sum(n.digits(2))
(Python 3.10+)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|