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-2 of 2 results.

A043545 (Maximal base-2 digit of n) - (minimal base-2 digit of n).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Characteristic function of A062289 (non-Mersenne numbers A000225). - Omar E. Pol, Sep 05 2021

Examples

			G.f. = x^2 + x^4 + x^5 + x^6 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + ...
		

Crossrefs

Column k=0 of A347519.

Programs

  • Haskell
    a043545 = (1 -) . a036987  -- Reinhard Zumkeller, Nov 02 2013
  • Mathematica
    mb2d[n_]:=Module[{n2=IntegerDigits[n,2]},Max[n2]-Min[n2]]; Array[mb2d,120,0] (* Harvey P. Dale, Feb 24 2015 *)
  • PARI
    {a(n) = if( n<0, 0, n++; n != 2^valuation(n, 2))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    a(n) = !!bitand(n, n+1); \\ Ruud H.G. van Tol, Sep 12 2023
    

Formula

0 followed by a string of 2^k - 1 1's. Also a(n)=0 iff n = 2^m - 1.
G.f.: 1/(1-x) - Sum_{k>=0} x^(2^k-1). - Michael Somos, Aug 25 2003
a(n) = 1 - A036987(n). 1's complement of Fredhold-Rueppel sequence. - Michael Somos, Aug 25 2003
a(n) = (1 + (-1)^binomial(n, floor(n/2)))/2. - Paul Barry, Jun 07 2006
Ignoring first zero and beginning instead with offset 2, a(n) = A006530(n) mod 2. - Rick L. Shepherd, Jun 09 2008
a(n) = A000777(n) mod 2, for n > 0. - John M. Campbell, Jul 16 2016

A038665 Convolution of A007054 (super ballot numbers) with A000984 (central binomial coefficients).

Original entry on oeis.org

3, 8, 25, 84, 294, 1056, 3861, 14300, 53482, 201552, 764218, 2912168, 11143500, 42791040, 164812365, 636438060, 2463251010, 9552774000, 37112526990, 144410649240, 562724141460, 2195581527360, 8576490341250, 33537507830424
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(n+3)*Catalan(n+1): n in [0..30]]; // Vincenzo Librandi, Sep 11 2016
  • Maple
    seq((n+3)*binomial(2*n+2, n+1)/(n+2), n=0..24); # Zerinvary Lajos, Dec 08 2008
  • Mathematica
    Table[(n + 3) (CatalanNumber[n + 1]), {n, 0, 30}] (* Vincenzo Librandi, Sep 11 2016 *)

Formula

a(n) = (n+3)*C(n+1) with C(n) the Catalan numbers A000108.
G.f.: c(x)*(4 - c(x))/sqrt(1 - 4*x) with c(x) the g.f. for the Catalan numbers.
From Amiram Eldar, May 16 2022: (Start)
Sum_{n>=0} 1/a(n) = 41/6 - 64*Pi/(9*sqrt(3)) + 2*Pi^2/3.
Sum_{n>=0} (-1)^n/a(n) = 57/10 - 256*log(phi)/(5*sqrt(5)) + 24*log(phi)^2, where phi is the golden ratio (A001622). (End)
Showing 1-2 of 2 results.