login
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
OFFSET
0,2
COMMENTS
Partial sums of A090739.
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
Related to partial sums of the Ruler sequence A001511 by a(n) = A005187(2n), therefore {a(n)+1} are the indices of 1's in A252488. - M. F. Hasler, Jan 22 2015
LINKS
Keith Johnson, and Kira Scheibelhut, Rational Polynomials That Take Integer Values at the Fibonacci Numbers, Amer. Math. Monthly 123.4 (2016): 338-346. See p. 340.
Philip Boyle Smith and Joe Davighi, Bosonisation Cohomology: Spin Structure Summation in Every Dimension, arXiv:2511.13718 [hep-th], 2025. See p. 33, after formula 3.29.
FORMULA
a(n) = log_2(16^n/A001316(n)). [This was the original definition.]
a(n) = 2n + A005187(n).
a(n) = 3n + A011371(n).
a(n) = 4n - log_2(A001316(n)).
a(n) = log_2(A061549(n)).
2^a(n) = 16^n/A001316(n) = A061549(n).
a(n) = A086343(n) + A001511(n) for n>0. - Alford Arnold, Mar 23 2009
2^a(n) = abs(A067624(n)/A117972(n)). - Johannes W. Meijer, Jul 06 2009
a(n) = Sum_{k>=0} (A030308(n,k)*A000225(k+2)). - Philippe Deléham, Oct 16 2011
a(n) = A005187(2n). - M. F. Hasler, Jan 22 2015
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
Table[4 n - DigitCount[n, 2, 1], {n, 0, 58}] (* Michael De Vlieger, Nov 06 2016 *)
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
(SageMath)
A120738 = lambda n: 4*n - sum(n.digits(2))
print([A120738(n) for n in (0..58)]) # Peter Luschny, Nov 06 2016
(Python)
# Python 3.10
def A120738(n): return (n<<2)-n.bit_count() # Chai Wah Wu, Jul 12 2022
(Magma)
A120738:= func< n | 4*n-(&+Intseq(n, 2)) >;
[A120738(n): n in [0..100]]; // G. C. Greubel, Oct 20 2024
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jun 29 2006
EXTENSIONS
Definition simplified by M. F. Hasler, Dec 29 2012
STATUS
approved