This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A120738 #61 Dec 27 2024 20:18:29 %S A120738 0,3,7,10,15,18,22,25,31,34,38,41,46,49,53,56,63,66,70,73,78,81,85,88, %T A120738 94,97,101,104,109,112,116,119,127,130,134,137,142,145,149,152,158, %U A120738 161,165,168,173,176,180,183,190,193,197,200,205,208,212,215,221,224,228 %N A120738 a(n) = 4*n - A000120(n). %C A120738 Partial sums of A090739. %C A120738 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 %C A120738 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 %H A120738 Michel Marcus, <a href="/A120738/b120738.txt">Table of n, a(n) for n = 0..10000</a> %H A120738 Keith Johnson, and Kira Scheibelhut, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.123.4.338">Rational Polynomials That Take Integer Values at the Fibonacci Numbers</a>, American Mathematical Monthly 123.4 (2016): 338-346. See p. 340. %F A120738 a(n) = log_2(16^n/A001316(n)). [This was the original definition.] %F A120738 a(n) = 2n + A005187(n). %F A120738 a(n) = 3n + A011371(n). %F A120738 a(n) = 4n - log_2(A001316(n)). %F A120738 a(n) = log_2(A061549(n)). %F A120738 2^a(n) = 16^n/A001316(n) = A061549(n). %F A120738 a(n) = A086343(n) + A001511(n) for n>0. - _Alford Arnold_, Mar 23 2009 %F A120738 2^a(n) = abs(A067624(n)/A117972(n)). - _Johannes W. Meijer_, Jul 06 2009 %F A120738 a(n) = Sum_{k>=0} (A030308(n,k)*A000225(k+2)). - _Philippe Deléham_, Oct 16 2011 %F A120738 a(n) = A005187(2n). - _M. F. Hasler_, Jan 22 2015 %p A120738 a:=n->simplify(log[2](16^n/(add(modp(binomial(n,k),2),k=0..n)))); %p A120738 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 %t A120738 Table[4 n - DigitCount[n, 2, 1], {n, 0, 58}] (* _Michael De Vlieger_, Nov 06 2016 *) %o A120738 (PARI) {a(n) = if( n < 0, 0, 4*n - subst( Pol( binary( n ) ), x, 1) ) } /* _Michael Somos_, Aug 28 2007 */ %o A120738 (PARI) a(n) = 4*n - hammingweight(n); \\ _Michel Marcus_, Nov 06 2016 %o A120738 (Sage) %o A120738 A120738 = lambda n: 4*n - sum(n.digits(2)) %o A120738 print([A120738(n) for n in (0..58)]) # _Peter Luschny_, Nov 06 2016 %o A120738 (Python) %o A120738 # Python 3.10 %o A120738 def A120738(n): return (n<<2)-n.bit_count() # _Chai Wah Wu_, Jul 12 2022 %o A120738 (Magma) %o A120738 A120738:= func< n | 4*n-(&+Intseq(n, 2)) >; %o A120738 [A120738(n): n in [0..100]]; // _G. C. Greubel_, Oct 20 2024 %Y A120738 Cf. A000120, A000225, A001316, A001511, A005187, A011371, A030308, A061549, A067624, A086343, A090739, A117972, A252488. %K A120738 easy,nonn %O A120738 0,2 %A A120738 _Paul Barry_, Jun 29 2006 %E A120738 Definition simplified by _M. F. Hasler_, Dec 29 2012