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.

Showing 1-5 of 5 results.

A135561 a(n) = 2^A135560(n) - 1.

Original entry on oeis.org

3, 7, 1, 15, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 63, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 127, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 255, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 63, 1, 3
Offset: 1

Views

Author

N. J. A. Sloane, Mar 01 2008

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := 1 + IntegerExponent[n, 2] + Sum[(-1)^(n - k - 1)*Binomial[n - 1, k]* Sum[Binomial[k, 2^j - 1], {j, 0, k}], {k, 0, n - 1}]; Table[2^f[k] - 1, {k, 1, 20}] (* G. C. Greubel, Oct 17 2016 *)
  • Python
    def A135561(n): return (1<<(m:=(~n & n-1)).bit_length()+int(m==n-1)+1)-1 # Chai Wah Wu, Jul 06 2022

Formula

a(2^k) = 2^(k+2) - 1; a(2^k + 2^(k-1)) = 2^k - 1. - Reinhard Zumkeller, Mar 02 2008

Extensions

More terms from Reinhard Zumkeller, Mar 02 2008

A135523 a(n) = A007814(n) + A209229(n).

Original entry on oeis.org

1, 2, 0, 3, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0
Offset: 1

Views

Author

N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008

Keywords

Crossrefs

This is Guy Steele's sequence GS(4, 1) (see A135416).
One less than A135560.

Programs

Formula

G.f.: x + Sum_{k>=1} x^(2^k)*(1 + 1/(1 - x^(2^k))). - Ilya Gutkovskiy, Mar 30 2017
a(n) = A135560(n) - 1. Antti Karttunen, Sep 27 2018

A135534 a(1) = 1; for n>=1, a(2n) = A135561(n), a(2n+1) = 0.

Original entry on oeis.org

1, 3, 0, 7, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 31, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 63, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 127, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 31, 0, 1, 0, 3, 0, 1
Offset: 1

Views

Author

N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008

Keywords

Crossrefs

Cf. A135416.
This is Guy Steele's sequence GS(6, 1) (see A135416).

Programs

  • Maple
    GS(6,1,200); [see A135416].
  • PARI
    A135560(n) = { my(t=valuation(n, 2)); (t + (n==2^t) + 1); }; \\ From A135560
    A135534(n) = if(1==n,1,if((n%2),0,((2^(A135560(n/2)))-1))); \\ Antti Karttunen, Sep 27 2018
    
  • Python
    def A135534(n): return 1 if n == 1 else 0 if n&1 else (1<<(m:=(~(k:=n>>1) & k-1)).bit_length()+int(m==k-1)+1)-1 # Chai Wah Wu, Jul 06 2022

A193259 G.f.: x = Sum_{n>=1} x^n * ((1+x)^n - x^n) / (1+x)^a(n).

Original entry on oeis.org

1, 4, 5, 9, 10, 12, 13, 18, 19, 21, 22, 25, 26, 28, 29, 35, 36, 38, 39, 42, 43, 45, 46, 50, 51, 53, 54, 57, 58, 60, 61, 68, 69, 71, 72, 75, 76, 78, 79, 83, 84, 86, 87, 90, 91, 93, 94, 99, 100, 102, 103, 106, 107, 109, 110, 114, 115, 117, 118, 121, 122, 124, 125, 133, 134, 136, 137, 140, 141, 143, 144, 148, 149, 151, 152, 155, 156, 158, 159, 164, 165, 167
Offset: 1

Views

Author

Paul D. Hanna, Jul 19 2011

Keywords

Comments

Sum_{n>=1} 1/phi^a(n) = 1/phi + Sum_{n>=1} 1/phi^(a(n) + 2*n) = 0.880771363850914609641... where phi = (sqrt(5)+1)/2. - Paul D. Hanna, Sep 14 2011

Examples

			G.f.: x = x*((1+x) - x)/(1+x) + x^2*((1+x)^2 - x^2)/(1+x)^4 + x^3*((1+x)^3 - x^3)/(1+x)^5 + x^4*((1+x)^4 - x^4)/(1+x)^9 + x^5*((1+x)^5 - x^5)/(1+x)^10 + x^6*((1+x)^6 - x^6)/(1+x)^12 + x^7*((1+x)^7 - x^7)/(1+x)^13 + x^8*((1+x)^8 - x^8)/(1+x)^18 +...+ x^n*((1+x)^n - x^n)/(1+x)^a(n) +...
		

Crossrefs

Programs

  • PARI
    {a(n)=if(n<1,0,n + floor(log(n+1/2)/log(2)) + valuation(n!,2))}
    
  • PARI
    {a(n)=if(n<1,0,if(n==1,1,polcoeff(sum(m=1,n+1,x^m*((1+x)^m-x^m)/(1+x +x^2*O(x^n))^if(m>=n,1,a(m)))+x^(n+1),n+1)))}

Formula

a(n) = n + floor(log_2(n)) + A011371(n) for n>=1, where A011371(n) = highest power of 2 dividing n!.
a(n) = a(n-1) + A135560(n) for n>1 with a(1)=1.

A241235 a(n) = number of times n appears in A006949.

Original entry on oeis.org

3, 3, 1, 4, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 8, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 17 2014

Keywords

Comments

Is this (with an exception at n=1) the same as A135560? - R. J. Mathar, Apr 26 2014

Crossrefs

Cf. A051135.

Programs

  • Haskell
    a241235 n = a241235_list !! (n-1)
    a241235_list = map length $ group a006949_list
Showing 1-5 of 5 results.