cp's OEIS Frontend

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.

A101925 a(n) = A005187(n) + 1.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 11, 12, 16, 17, 19, 20, 23, 24, 26, 27, 32, 33, 35, 36, 39, 40, 42, 43, 47, 48, 50, 51, 54, 55, 57, 58, 64, 65, 67, 68, 71, 72, 74, 75, 79, 80, 82, 83, 86, 87, 89, 90, 95, 96, 98, 99, 102, 103, 105, 106, 110, 111, 113, 114, 117, 118, 120, 121, 128, 129
Offset: 0

Views

Author

Ralf Stephan, Dec 28 2004

Keywords

Comments

Exponent of 2 in the sequences A032184, A052278, A060055, A066318, A088229, A101926.
p(n) sequence for k=2, s=0. p(n) = min(j: A046699(j) = n). - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)

Crossrefs

Bisection of A089279. First differences are in A001511.

Programs

  • Mathematica
    Table[IntegerExponent[(2 n)!, 2] + 1, {n, 0, 65}] (* or *)
    Table[2 n - DigitCount[2 n, 2, 1] + 1, {n, 0, 65}] (* Michael De Vlieger, Feb 04 2017 *)
  • PARI
    a(n)=1+sum(k=1, n, valuation(k,2)+1)
    
  • PARI
    a(n)=if(n==0,1,if((n%2)==0,2*a(n/2)+subst(Pol(binary(n)),x,1)-1,a(n-1)+1))
    
  • PARI
    a(n)=2*n+1-hammingweight(n) \\ Charles R Greathouse IV, Dec 29 2022
    (Python 3.10+)
    def A101925(n): return (n<<1)-n.bit_count()+1 # Chai Wah Wu, Jul 13 2022

Formula

Recurrence: a(2n) = 2a(n) + A000120(n) - 1, a(2n+1) = a(2n) + 1.
G.f.: (1 / 1-z) * (z + z * sum(z^(2^i) * (s + (1 / (1 - z^(2^k)))),i=0..infinity)). - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)