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

A007052 Number of order-consecutive partitions of n.

Original entry on oeis.org

1, 3, 10, 34, 116, 396, 1352, 4616, 15760, 53808, 183712, 627232, 2141504, 7311552, 24963200, 85229696, 290992384, 993510144, 3392055808, 11581202944, 39540700160, 135000394752, 460920178688, 1573679925248, 5372879343616, 18344157523968, 62630871408640, 213835170586624
Offset: 0

Views

Author

Colin Mallows, N. J. A. Sloane, and Simon Plouffe

Keywords

Comments

After initial terms, first differs from A291292 at a(6) = 1352, A291292(8) = 1353.
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 3) is "size of raises in pot-limit poker, one blind, maximum raising".
It appears that this sequence is the BinomialMean transform of A001653 (see A075271). - John W. Layman, Oct 03 2002
Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 3, s(2n+1) = 4. - Herbert Kociemba, Jun 12 2004
Equals the INVERT transform of (1, 2, 5, 13, 34, 89, ...). - Gary W. Adamson, May 01 2009
a(n) is the number of compositions of n when there are 3 types of ones. - Milan Janjic, Aug 13 2010
a(n)/a(n-1) tends to (4 + sqrt(8))/2 = 3.414213.... Gary W. Adamson, Jul 30 2013
a(n) is the first subdiagonal of array A228405. - Richard R. Forberg, Sep 02 2013
Number of words of length n over {0,1,2,3,4} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
From Gus Wiseman, Mar 05 2020: (Start)
Also the number of unimodal sequences of length n + 1 covering an initial interval of positive integers, where a sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. For example, the a(0) = 1 through a(2) = 10 sequences are:
(1) (1,1) (1,1,1)
(1,2) (1,1,2)
(2,1) (1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,1)
(2,2,1)
(2,3,1)
(3,2,1)
Missing are: (2,1,2), (2,1,3), (3,1,2).
Conjecture: Also the number of ordered set partitions of {1..n + 1} where no element of any block is greater than any element of a non-adjacent consecutive block. For example, the a(0) = 1 through a(2) = 10 ordered set partitions are:
{{1}} {{1,2}} {{1,2,3}}
{{1},{2}} {{1},{2,3}}
{{2},{1}} {{1,2},{3}}
{{1,3},{2}}
{{2},{1,3}}
{{2,3},{1}}
{{3},{1,2}}
{{1},{2},{3}}
{{1},{3},{2}}
{{2},{1},{3}}
a(n-1) is the number of hexagonal directed-column convex polyominoes having area n (see Baril et al. at page 4). - Stefano Spezia, Oct 14 2023

Examples

			G.f. = 1 + 3*x + 10*x^2 + 34*x^3 + 116*x^4 + 396*x^5 + 1352*x^6 + 4616*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Floor((2+Sqrt(2))^n*(1/2+Sqrt(2)/4)+(2-Sqrt(2))^n*(1/2-Sqrt(2)/4)): n in [0..30] ] ; // Vincenzo Librandi, Aug 20 2011
  • Mathematica
    a[n_]:=(MatrixPower[{{3,1},{1,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    a[ n_] := ((2 + Sqrt[2])^(n + 1) + (2 - Sqrt[2])^(n + 1)) / 4 // Simplify; (* Michael Somos, Jan 25 2017 *)
    LinearRecurrence[{4, -2}, {1, 3}, 24] (* Jean-François Alcover, Jan 07 2019 *)
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Union@@Permutations/@allnorm[n],unimodQ]],{n,6}] (* Gus Wiseman, Mar 06 2020 *)
  • PARI
    {a(n) = real((2 + quadgen(8))^(n+1)) / 2}; /* Michael Somos, Mar 06 2003 */
    

Formula

a(n+1) = 4*a(n) - 2*a(n-1).
G.f.: (1-x)/(1-4*x+2*x^2).
Binomial transform of Pell numbers 1, 2, 5, 12, ... (A000129).
a(n) = A006012(n+1)/2 = A056236(n+1)/4. - Michael Somos, Mar 06 2003
a(n) = (A035344(n)+1)/2; a(n) = (2+sqrt(2))^n(1/2+sqrt(2)/4)+(2-sqrt(2))^n(1/2-sqrt(2)/4). - Paul Barry, Jul 16 2003
Second binomial transform of (1, 1, 2, 2, 4, 4, ...). a(n) = Sum_{k=1..floor(n/2)}, C(n, 2k)*2^(n-k-1). - Paul Barry, Nov 22 2003
a(n) = ( (2-sqrt(2))^(n+1) + (2+sqrt(2))^(n+1) )/4. - Herbert Kociemba, Jun 12 2004
a(n) = both left and right terms in M^n * [1 1 1], where M = the 3 X 3 matrix [1 1 1 / 1 2 1 / 1 1 1]. M^n * [1 1 1] = [a(n) A007070(n) a(n)]. E.g., a(3) = 34. M^3 * [1 1 1] = [34 48 34] (center term is A007070(3)). - Gary W. Adamson, Dec 18 2004
The i-th term of the sequence is the entry (2, 2) in the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 3)). - Simone Severini, Oct 15 2005
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x)+sinh(sqrt(2)*x)/sqrt(2)). - Paul Barry, Nov 20 2003
a(n) = A007068(2*n), n>0. - R. J. Mathar, Aug 17 2009
If p[i]=Fibonacci(2i-1) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
a(n-1) = Sum_{k=-floor(n/4)..floor(n/4)} (-1)^k*binomial(2*n,n+4*k)/2. - Mircea Merca, Jan 28 2012
G.f.: G(0)*(1-x)/(2*x) + 1 - 1/x, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - (1-x)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n) = 3*a(n-1) + a(n-2) + a(n-3) + a(n-4) + ... + a(0). - Gary W. Adamson, Aug 12 2013
a(n) = a(-2-n) * 2^(n+1) for all n in Z. - Michael Somos, Jan 25 2017

A062112 a(0)=0; a(1)=1; a(n) = a(n-1) + (3 + (-1)^n)*a(n-2)/2.

Original entry on oeis.org

0, 1, 1, 2, 4, 6, 14, 20, 48, 68, 164, 232, 560, 792, 1912, 2704, 6528, 9232, 22288, 31520, 76096, 107616, 259808, 367424, 887040, 1254464, 3028544, 4283008, 10340096, 14623104, 35303296, 49926400, 120532992, 170459392, 411525376
Offset: 0

Views

Author

Olivier Gérard, Jun 05 2001

Keywords

Examples

			a(4) = a(3) + 2*a(2) = 2 + 2 = 4.
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+x-2*x^2)/(1-4*x^2+2*x^4))); // G. C. Greubel, Oct 16 2018
  • Mathematica
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==a[n-1]+(3+(-1)^n) (a[n-2])/2},a,{n,40}] (* or *) LinearRecurrence[{0,4,0,-2},{0,1,1,2},40] (* Harvey P. Dale, May 24 2013 *)
  • PARI
    { for (n=0, 200, if (n>1, a=a1 + (3 + (-1)^n)*a2/2; a2=a1; a1=a, if (n==0, a=a2=0, a=a1=1)); write("b062112.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 01 2009
    

Formula

a(2*n) = A007070(n+1).
a(2*n+1) = A006012(n).
G.f.: x*(1+x-2*x^2)/(1-4*x^2+2*x^4).
a(n) = 4*a(n-2) - 2*a(n-4), a(0)=0, a(1)=1, a(2)=1, a(3)=2. - Harvey P. Dale, May 24 2013

A249310 Expansion of x*(1+7*x-6*x^3)/(1-8*x^2+6*x^4).

Original entry on oeis.org

1, 7, 8, 50, 58, 358, 416, 2564, 2980, 18364, 21344, 131528, 152872, 942040, 1094912, 6747152, 7842064, 48324976, 56167040, 346116896, 402283936, 2478985312, 2881269248, 17755181120, 20636450368, 127167537088, 147803987456, 910809209984, 1058613197440
Offset: 1

Views

Author

Colin Barker, Oct 25 2014

Keywords

Comments

It seems that this is also the first row of the spectral array W(sqrt(10)-2).
It also seems that, for all k>0, the first row of W(sqrt(k^2+1)-k+1) has a generating function of the form x*(1+(2*k+1)*x-2*k*x^3)/(1-(2*k+2)*x^2+2*k*x^4).

Crossrefs

Cf. A007068 (k=1), A022165 (k=2), A249311 (k=4), A249312 (k=5), A249313 (k=6).

Programs

  • Mathematica
    CoefficientList[Series[(1 + 7 x - 6 x^3)/(1 - 8 x^2 + 6 x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 25 2014 *)
    LinearRecurrence[{0,8,0,-6},{1,7,8,50},30] (* Harvey P. Dale, Sep 22 2019 *)
  • PARI
    Vec((1+7*x-6*x^3)/(1-8*x^2+6*x^4) + O(x^100))

A249311 Expansion of x*(1+9*x-8*x^3)/(1-10*x^2+8*x^4).

Original entry on oeis.org

1, 9, 10, 82, 92, 748, 840, 6824, 7664, 62256, 69920, 567968, 637888, 5181632, 5819520, 47272576, 53092096, 431272704, 484364800, 3934546432, 4418911232, 35895282688, 40314193920, 327476455424, 367790649344, 2987602292736, 3355392942080, 27256211283968
Offset: 1

Views

Author

Colin Barker, Oct 25 2014

Keywords

Comments

It seems that this is also the first row of the spectral array W(sqrt(17)-3).
It also seems that, for all k>0, the first row of W(sqrt(k^2+1)-k+1) has a generating function of the form x*(1+(2*k+1)*x-2*k*x^3)/(1-(2*k+2)*x^2+2*k*x^4).

Crossrefs

Cf. A007068 (k=1), A022165 (k=2), A249310 (k=3), A249312 (k=5), A249313 (k=6).

Programs

  • PARI
    Vec(x*(1+9*x-8*x^3)/(1-10*x^2+8*x^4) + O(x^100))

A249312 Expansion of x*(1+11*x-10*x^3)/(1-12*x^2+10*x^4).

Original entry on oeis.org

1, 11, 12, 122, 134, 1354, 1488, 15028, 16516, 166796, 183312, 1851272, 2034584, 20547304, 22581888, 228054928, 250636816, 2531186096, 2781822912, 28093683872, 30875506784, 311812345504, 342687852288, 3460811307328, 3803499159616, 38411612232896
Offset: 1

Views

Author

Colin Barker, Oct 25 2014

Keywords

Comments

It seems that this is also the first row of the spectral array W(sqrt(26)-4).
It also seems that, for all k>0, the first row of W(sqrt(k^2+1)-k+1) has a generating function of the form x*(1+(2*k+1)*x-2*k*x^3)/(1-(2*k+2)*x^2+2*k*x^4).

Crossrefs

Cf. A007068 (k=1), A022165 (k=2), A249310 (k=3), A249311 (k=4), A249313 (k=6).

Programs

  • Mathematica
    LinearRecurrence[{0,12,0,-10},{1,11,12,122},40] (* Harvey P. Dale, Feb 02 2015 *)
  • PARI
    Vec(x*(1+11*x-10*x^3)/(1-12*x^2+10*x^4) + O(x^100))

Formula

a(1)=1, a(2)=11, a(3)=12, a(4)=122, a(n)=12*a(n-2)-10*a(n-4). - Harvey P. Dale, Feb 02 2015

A249313 Expansion of x*(1+13*x-12*x^3)/(1-14*x^2+12*x^4).

Original entry on oeis.org

1, 13, 14, 170, 184, 2224, 2408, 29096, 31504, 380656, 412160, 4980032, 5392192, 65152576, 70544768, 852375680, 922920448, 11151428608, 12074349056, 145891492352, 157965841408, 1908663749632, 2066629591040, 24970594586624, 27037224177664, 326684359217152
Offset: 1

Views

Author

Colin Barker, Oct 25 2014

Keywords

Comments

It seems that this is also the first row of the spectral array W(sqrt(37)-5).
It also seems that, for all k>0, the first row of W(sqrt(k^2+1)-k+1) has a generating function of the form x*(1+(2*k+1)*x-2*k*x^3)/(1-(2*k+2)*x^2+2*k*x^4).

Crossrefs

Cf. A007068 (k=1), A022165 (k=2), A249310 (k=3), A249311 (k=4), A249312 (k=5).

Programs

  • Mathematica
    CoefficientList[Series[x (1+13x-12x^3)/(1-14x^2+12x^4),{x,0,30}],x] (* or *) LinearRecurrence[{0,14,0,-12},{1,13,14,170},30] (* Harvey P. Dale, Oct 19 2018 *)
  • PARI
    Vec(x*(1+13*x-12*x^3)/(1-14*x^2+12*x^4) + O(x^100))

A062113 a(0)=1; a(1)=2; a(n) = a(n-1) + a(n-2)*(3 - (-1)^n)/2.

Original entry on oeis.org

1, 2, 3, 7, 10, 24, 34, 82, 116, 280, 396, 956, 1352, 3264, 4616, 11144, 15760, 38048, 53808, 129904, 183712, 443520, 627232, 1514272, 2141504, 5170048, 7311552, 17651648, 24963200, 60266496, 85229696, 205762688, 290992384, 702517760
Offset: 0

Views

Author

Olivier Gérard, Jun 05 2001

Keywords

Comments

A bistable recurrence.

Crossrefs

Programs

  • Haskell
    a062113 n = a062113_list !! n
    a062113_list = 1 : 2 : zipWith (+)
       (tail a062113_list) (zipWith (*) a000034_list a062113_list)
    -- Reinhard Zumkeller, Jan 21 2012
    
  • Magma
    I:=[1,2,3,7]; [n le 4 select I[n] else 4*Self(n-2) - 2*Self(n-4): n in [1..40]]; // G. C. Greubel, Oct 16 2018
  • Mathematica
    LinearRecurrence[{0,4,0,-2}, {1,2,3,7}, 40] (* G. C. Greubel, Oct 16 2018 *)
  • PARI
    { for (n=0, 200, if (n>1, a=a1 + a2*(3 - (-1)^n)/2; a2=a1; a1=a, if (n==0, a=a2=1, a=a1=2)); write("b062113.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 01 2009
    
  • PARI
    x='x+O('x^40); Vec((1+2*x-x^2-x^3)/(1-4*x^2+2*x^4)) \\ G. C. Greubel, Oct 16 2018
    

Formula

a(n) = a(n-1) + a(n-2) * A000034(n). - Reinhard Zumkeller, Jan 21 2012
From Colin Barker, Apr 20 2012: (Start)
a(n) = 4*a(n-2) - 2*a(n-4).
G.f.: (1+2*x-x^2-x^3)/(1-4*x^2+2*x^4). (End)

A249309 First row of spectral array W(Pi/2).

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 20, 35, 54, 96, 150, 264, 414, 726, 1140, 1997, 3136, 5495, 8631, 15121, 23752, 41612, 65363, 114513, 179876, 315132, 495008, 867223, 1362230, 2386544, 3748774, 6567622, 10316396
Offset: 1

Views

Author

Colin Barker, Oct 25 2014

Keywords

Crossrefs

Programs

  • PARI
    \\ The first row of the generalized Wythoff array W(h),
    \\   where h is an irrational number between 1 and 2.
    row1(h, m) = {
      my(
        a=vector(m, n, floor(n*h)),
        b=setminus(vector(m, n, n), a),
        w=[a[1]^2, b[a[1]]],
        j=3
      );
      while(1,
        if(j%2==1,
          if(w[j-1]<=#a, w=concat(w, a[w[j-1]]), return(w))
        ,
          if(w[j-2]<=#b, w=concat(w, b[w[j-2]]), return(w))
        );
        j++
      );
      w
    }
    allocatemem(10^9)
    row1(Pi/2, 10^7)

A121720 a(n) = 4*a(n-2) - 2*a(n-4).

Original entry on oeis.org

0, 1, 1, 3, 4, 10, 14, 34, 48, 116, 164, 396, 560, 1352, 1912, 4616, 6528, 15760, 22288, 53808, 76096, 183712, 259808, 627232, 887040, 2141504, 3028544, 7311552, 10340096, 24963200, 35303296, 85229696, 120532992, 290992384, 411525376, 993510144, 1405035520
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 07 2006

Keywords

Comments

For n>1, number of walks of length n-2 on the 5-vertex graph with edges {{0,1}, {1,2}, {2,3}, {2,4}} starting at vertex 3. - Sean A. Irvine, Jun 03 2025

Crossrefs

Essentially the same as A007068.

Programs

  • Mathematica
    LinearRecurrence[{0,4,0,-2},{0,1,1,3},30] (* Harvey P. Dale, May 21 2014 *)

Formula

a(n) = A007068(n-2), n>2.
G.f.: -x^2*(-1-x+x^2)/(1-4*x^2+2*x^4). [Oct 14 2009]

Extensions

Definition replaced by recurrence - The Assoc. Editors of the OEIS, Oct 14 2009
More terms from Harvey P. Dale, May 21 2014

A249697 First row of spectral array W(Pi-2).

Original entry on oeis.org

1, 8, 9, 64, 73, 516, 589, 4160, 4749, 33540, 38289, 270416, 308704, 2180232, 2488936, 17578149
Offset: 1

Views

Author

Colin Barker, Nov 04 2014

Keywords

Crossrefs

Programs

  • PARI
    \\ Row i of the generalized Wythoff array W(h),
    \\ where h is an irrational number between 1 and 2,
    \\ and m is the number of terms in the vectors a and b.
    row(h, i, m) = {
      my(
        a=vector(m, n, floor(n*h)),
        b=vector(m, n, floor(n*h/(h-1))),
        w=[a[a[i]], b[a[i]]],
        j=3
      );
      while(1,
        if(j%2==1,
          if(w[j-1]<=#a, w=concat(w, a[w[j-1]]), return(w))
        ,
          if(w[j-2]<=#b, w=concat(w, b[w[j-2]]), return(w))
        );
        j++
      )
    }
    allocatemem(10^9)
    row(Pi-2, 1, 10^7)
Showing 1-10 of 10 results.