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

A217988 Binomial transform of A215495(n).

Original entry on oeis.org

1, 2, 4, 10, 26, 66, 160, 372, 840, 1864, 4096, 8944, 19424, 41952, 90112, 192576, 409728, 868480, 1835008, 3866368, 8125952, 17038848, 35651584, 74449920, 155191296, 322963456, 671088640, 1392504832, 2885672960, 5972680704, 12348030976, 25501384704
Offset: 0

Views

Author

Paul Curtz, Oct 17 2012

Keywords

Comments

Companion to A218009.
Like any other sequence with a linear recurrence with constant coefficients, this sequence is periodic if read modulo some constant m. These Pisano period lengths for m>=1 are 1, 1, 8, 1, 20, 8, 168, 1, 24, 20, 440, 8, 156, 168, 40, 1, 272, 24, 1368, 20, ... [Curtz's comment reformulated and extended by R. J. Mathar, Oct 23 2012]
Let b(n) = a(n+1)-2*a(n), then b(n+3)-2*b(n+2) = A009545(n+2). - edited by Michel Marcus, Apr 24 2018

Examples

			a(n) and successive differences:
1, 2,  4, 10, 26,  66, 160, 372,  840, 1864, 4096, ...
1, 2,  6, 16, 40,  94, 212, 468, 1024, ...
1, 4, 10, 24, 54, 118, 256, ...
3, 6, 14, 30, 64, ...
3, 8, 16, ...
5, 8, ...
3, ...
		

Crossrefs

Programs

  • Magma
    I:=[1, 2, 4, 10, 26, 66]; [n le 6 select I[n] else 6*Self(n-1) - 14*Self(n-2) + 16*Self(n-3) - 8*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 15 2012
    
  • Mathematica
    a[n_] := Sum[ Binomial[n, k]*If[ OddQ[k], k, k/2 + Boole[ Mod[k, 4] == 0]], {k, 0, n}]; Table[ a[n], {n, 0, 31}] (* Jean-François Alcover, Oct 17 2012 *)
    CoefficientList[Series[(1-4*x+6*x^2-2*x^3-2*x^4+2*x^5)/((1-2*x)^2 * (1 - 2*x + 2*x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 15 2012 *)
    LinearRecurrence[{6,-14,16,-8},{1,2,4,10,26,66},40] (* Harvey P. Dale, Aug 14 2018 *)
  • PARI
    x='x+O('x^30); Vec((1-4*x+6*x^2-2*x^3-2*x^4+2*x^5)/((1-2*x)^2*(1-2*x+2*x^2))) \\ G. C. Greubel, Apr 23 2018

Formula

a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4) with n > 5.
a(n) = A218009(n) + A146559(n).
G.f.: (1-4*x+6*x^2-2*x^3-2*x^4+2*x^5)/((1-2*x)^2*(1-2*x+2*x^2)). - Bruno Berselli, Oct 22 2012
a(n) = 2^(n-3)*(3*n+2)+((1+i)^n+(1-i)^n)/4, where i=sqrt(-1) and n>1, with a(0)=1, a(1)=2.

A214282 Largest Euler characteristic of a downset on an n-dimensional cube.

Original entry on oeis.org

1, 1, 1, 3, 6, 10, 15, 35, 70, 126, 210, 462, 924, 1716, 3003, 6435, 12870, 24310, 43758, 92378, 184756, 352716, 646646, 1352078, 2704156, 5200300, 9657700, 20058300, 40116600, 77558760, 145422675, 300540195, 601080390, 1166803110, 2203961430, 4537567650, 9075135300, 17672631900
Offset: 1

Views

Author

Terence Tao, Jul 09 2012

Keywords

Comments

An m-downset is a set of subsets of 1..m such that if S is in the set, so are all subsets of S. The Euler characteristic of a downset is the number of sets in the downset with an even cardinality, minus the number with an odd cardinality.

Examples

			G.f. = x + x^2 + x^3 + 3*x^4 + 6*x^5 + 10*x^6 + 15*x^7 + 35*x^8 + ...
		

Crossrefs

Cf. A214283.

Programs

  • Haskell
    a214282 n = a007318 (n - 1) (a004524 (n - 1))
    -- Reinhard Zumkeller, Jul 14 2012
    
  • Mathematica
    Table[{Binomial[n - 1, n/2], Binomial[n, n/2], Binomial[n + 1, n/2 + 1], Binomial[n + 2, n/2 + 2]}, {n, 0, 28, 4}] (* Alonso del Arte, Jul 09 2012 *)
  • PARI
    a(n)=binomial(n-1,if(n%2,(n+1)\4*2,n/2)) \\ Charles R Greathouse IV, Jul 09 2012
    
  • PARI
    {a(n) = if( n<1, 0, vecmax( Vec((1 - x)^(n-1))))}; /* Michael Somos, Apr 21 2014 */
    
  • Python
    from math import comb
    def A214282(n): return comb(n-1, (n+1>>1)&(-1^(n&1))) # Chai Wah Wu, Jan 31 2024

Formula

a(n) = binomial(n - 1, n/2) when n is even, a(n) = binomial(n - 1, (n + 1)/2) when n is 3 mod 4, and a(n) = binomial(n - 1, (n - 1)/2) when n is 1 mod 4.
a(2n) = A001700(n-1). a(4n+1) = A001448(n). a(4n+3) = A186231(n).
a(n) = A214283(n) + A001405(n). - Reinhard Zumkeller, Jul 14 2012
a(n) = A007318(n-1, A004524(n-1)). - Reinhard Zumkeller, Jul 14 2012
a(n+1) = A000108([n/2])*A215495(n). - M. F. Hasler, Aug 25 2012
A214282(n) - A214283(n) is A056040(n) if n is even and A056040(n)/((n+1)/2) otherwise. - Peter Luschny, Jul 08 2016

A212831 a(4*n) = 2*n, a(2*n+1) = 2*n+1, a(4*n+2) = 2*n+2.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, 11, 6, 13, 8, 15, 8, 17, 10, 19, 10, 21, 12, 23, 12, 25, 14, 27, 14, 29, 16, 31, 16, 33, 18, 35, 18, 37, 20, 39, 20, 41, 22, 43, 22, 45, 24, 47, 24, 49, 26, 51, 26, 53, 28, 55, 28, 57, 30, 59, 30, 61, 32, 63, 32, 65, 34, 67, 34, 69, 36, 71, 36, 73, 38, 75
Offset: 0

Views

Author

Paul Curtz, Aug 14 2012

Keywords

Comments

First differences: (1, 1, 1, -1, 3, -1, 3, -3, 5,...) = (1, A186422).
Second differences: (0, 0, -2, 4, -4, 4, -6, 8, ...) = (-1)^(n+1) * A201629(n).
Interleave the terms with even indices of the companion A215495 and this one to get (A215495(0), A212831(0), A215495(2), A212831(2),...) = (1, 0, 1, 2, 3, 2, 3, 4, 5, 4,...) = A106249, up to the initial term = A083219 = A083220/2.

Crossrefs

Programs

  • Magma
    [(1/4)*((1 +(-1)^n)*(1 - (-1)^Floor(n/2)) + (3 -(-1)^n)*n): n in [0..50]]; // G. C. Greubel, Apr 25 2018
  • Mathematica
    a[n_] := (1/4)*((-(1 + (-1)^n))*(-1 + (-1)^Floor[n/2]) - (-3 + (-1)^n)*n ); Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Sep 18 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1},{0,1,2,3,2,5},80] (* Harvey P. Dale, May 29 2016 *)
  • PARI
    A212831(n)=if(bittest(n,0), n, n\2+bittest(n,1)) \\ M. F. Hasler, Oct 21 2012
    
  • PARI
    for(n=0,50, print1((1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n), ", ")) \\ G. C. Greubel, Apr 25 2018
    

Formula

a(n) + A215495(n) = A043547(n).
a(n) = -A214283(n)/A000108([n/2]).
a(n+1) = (A186421(n)=0,1,2,1,4,...) + 1.
a(2*n) = A052928(n+1).
a(n+2) - a(n) = 2, 2, 0, 2. (period 4).
a(n) = a(n-2) +a(n-4) -a(n-6); also holds for A215495(n).
G.f.: x*(1+2*x+2*x^2+x^4) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Aug 21 2012
a(n) = (1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n). - G. C. Greubel, Apr 25 2018

Extensions

Corrected and edited by M. F. Hasler, Oct 21 2012
Showing 1-3 of 3 results.