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.

A094373 Expansion of (1-x-x^2)/((1-x)*(1-2*x)).

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 0

Views

Author

Paul Barry, Apr 28 2004

Keywords

Comments

Partial sum of 1,1,1,2,4,8,...
Binomial transform of abs(A073097).
Binomial transform is A094374.
Partial sums are in A006127. - Paul Barry, Aug 05 2004
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 2, 8, 32 and 128, lead to this sequence. For the central square these vectors lead to the companion sequence A011782. - Johannes W. Meijer, Aug 15 2010
This sequence has a(0) = 1 and for all n > 0, a(n) = 2^(n-1)+1. Consequently 2*a(n) >= a(n+1) for all n > 0 and the sequence is complete. - Frank M Jackson, Jan 29 2012
Row lengths of the triangle in A198069. - Reinhard Zumkeller, May 26 2013
Take A007843 and count the repeated values. The result is 1,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,.... Build a third sequence, where a(1) = 1 and a(n) equals the length (greater than 1) of the shortest palindromic subsequence of consecutive terms of the second sequence starting with a(n) of the second sequence. The third sequence starts 1,3,5,3,9,3,5,3,17,3,5,3,9,3,5,3,33,.... Conjecturally, in the third sequence: (1) the indices of the first occurrence of each value form the present sequence and (2) for n>1, a(n) is in the a(n-1)-th position. - Ivan N. Ianakiev, Aug 20 2019

Examples

			G.f. = 1 + 2*x + 3*x^2 + 5*x^3 + 9*x^4 + 17*x^5 + 33*x^6 + 65*x^7 + ...
		

Crossrefs

Apart from the initial 1, identical to A000051.
Cf. A135225.
Column k=1 of A152977.
Row n=2 of A238016.

Programs

  • GAP
    a:=[2,3];; for n in [3..40] do a[n]:=3*a[n-1]-2*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, Nov 06 2019
  • Magma
    [(2^n-0^n)/2+1: n in [0..40]]; // Vincenzo Librandi, Jun 10 2011
    
  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( (1-x-x^2)/((1-x)*(1-2*x)))); // Marius A. Burtea, Oct 25 2019
    
  • Maple
    1, seq((2^n - 0^n)/2 +1, n=1..40); # G. C. Greubel, Nov 06 2019
  • Mathematica
    CoefficientList[Series[(1-x-x^2)/((1-x)*(1-2*x)), {x, 0, 40}], x] (* or *) Join[{1}, LinearRecurrence[{3, -2}, {2, 3}, 40]] (* Vladimir Joseph Stephan Orlovsky, Jan 22 2012 *)
    a[ n_]:= If[n<0, 0, 1 + Quotient[2^n, 2]]; (* Michael Somos, May 26 2014 *)
    a[ n_]:= SeriesCoefficient[(1-x-x^2)/((1-x)(1-2x)), {x, 0, n}]; (* Michael Somos, May 26 2014 *)
    LinearRecurrence[{3,-2},{1,2,3},40] (* Harvey P. Dale, Aug 09 2015 *)
  • PARI
    a(n)=2^n\2+1 \\ Charles R Greathouse IV, Apr 05 2013
    
  • PARI
    Vec((1-x-x^2)/((1-x)*(1-2*x))+O(x^40)) \\ Charles R Greathouse IV, Apr 05 2013
    
  • Sage
    [(2^n - 0^n)/2 + 1 for n in (0..40)] # G. C. Greubel, Nov 06 2019
    

Formula

a(n) = (2^n - 0^n)/2 + 1.
a(n) = 3*a(n-1) - 2*a(n-2).
a(2*n) = 2*a(2*n-1) - 1, n>0.
Row sums of triangle A135225. - Gary W. Adamson, Nov 23 2007
a(n) = A131577(n) + 1. - Paul Curtz, Aug 07 2008
a(n) = 2*a(n-1) - 1 for n>1, a(0)=1, a(1)=2. - Philippe Deléham, Sep 25 2009
E.g.f.: exp(x)*(1 + sinh(x)). - Arkadiusz Wesolowski, Aug 13 2012
G.f.: G(0), where G(k)= 1 + 2^k*x/(1 - x/(x + 2^k*x/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 26 2013
a(n) = 2^(n-1) +1 = A000051(n-1) for n>0. - M. F. Hasler, Sep 22 2013

A254028 a(n) = 2^(n+1) + 3^n + 3.

Original entry on oeis.org

6, 10, 20, 46, 116, 310, 860, 2446, 7076, 20710, 61100, 181246, 539636, 1610710, 4815740, 14414446, 43177796, 129402310, 387944780, 1163310046, 3488881556, 10464547510, 31389448220, 94159956046, 282463090916, 847355718310
Offset: 0

Views

Author

Luciano Ancora, Jan 22 2015

Keywords

Comments

This is the sequence of third terms of "second partial sums of m-th powers".

Crossrefs

Programs

  • Mathematica
    Table[2^(n+1)+3^n+3,{n,0,30}] (* or *) LinearRecurrence[{6,-11,6},{6,10,20},30] (* Harvey P. Dale, Mar 27 2025 *)
  • PARI
    a(n)=2<Charles R Greathouse IV, Jan 23 2015
    
  • PARI
    Vec(-2*(13*x^2-13*x+3)/((x-1)*(2*x-1)*(3*x-1)) + O(x^100)) \\ Colin Barker, Jan 24 2015

Formula

G.f.: -2*(13*x^2-13*x+3) / ((x-1)*(2*x-1)*(3*x-1)). - Colin Barker, Jan 24 2015
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3). - Colin Barker, Jan 24 2015
a(n) = A085279(n+1) = 2*( A099754(n)+1 ) = 2*( A094374(n)-2 ). [Bruno Berselli, Jan 26 2015]

A125103 Triangle read by rows: T(n,k) = binomial(n,k) + 2^k*binomial(n,k+1) (0 <= k <= n).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 9, 7, 1, 5, 16, 22, 12, 1, 6, 25, 50, 50, 21, 1, 7, 36, 95, 140, 111, 38, 1, 8, 49, 161, 315, 371, 245, 71, 1, 9, 64, 252, 616, 966, 952, 540, 136, 1, 10, 81, 372, 1092, 2142, 2814, 2388, 1188, 265, 1, 11, 100, 525, 1800, 4242, 6972, 7890, 5880, 2605, 522, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 20 2006

Keywords

Comments

Row sums = A094374: (1, 3, 8, 21, 56, ...).
Binomial transform of the infinite bidiagonal matrix with (1,1,1,...) in the main diagonal and (1,2,4,8,...) in the subdiagonal.

Examples

			First few rows of the triangle are
  1;
  2,   1;
  3,   4,   1;
  4,   9,   7,   1;
  5,  16,  22,  12,   1;
  6,  25,  50,  50,  21,   1;
  7,  36,  95, 140, 111,  38,  1;
  ...
		

Crossrefs

Cf. A094374.

Programs

  • Maple
    T:=(n,k)->binomial(n,k)+2^k*binomial(n,k+1): for n from 0 to 11 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    Table[Binomial[n,k]+2^k Binomial[n,k+1],{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    T(n,k) = binomial(n,k) + 2^k*binomial(n,k+1);
    matrix(11, 11, n, k, T(n-1,k-1)) \\ Michel Marcus, Nov 09 2019

Extensions

Edited by N. J. A. Sloane, Nov 29 2006

A094375 a(n) = (4^n - 2^n)/2 + 3^n.

Original entry on oeis.org

1, 4, 15, 55, 201, 739, 2745, 10315, 39201, 150499, 582825, 2273275, 8918001, 35144659, 138992505, 551203435, 2190497601, 8719009219, 34747027785, 138600952795, 553242074001, 2209482560179, 8827471984665, 35278511073355
Offset: 0

Views

Author

Paul Barry, Apr 28 2004

Keywords

Comments

Binomial transform of A094374.

Crossrefs

Programs

  • Magma
    [2^(n-1)*(2^n -1) +3^n: n in [0..30]]; // G. C. Greubel, Sep 26 2024
    
  • Mathematica
    LinearRecurrence[{9,-26,24}, {1,4,15}, 31] (* G. C. Greubel, Sep 26 2024 *)
  • SageMath
    [(4^n +2*3^n -2^n)//2 for n in range(31)] # G. C. Greubel, Sep 26 2024

Formula

G.f.: (1-5*x+5*x^2)/((1-2*x)*(1-3*x)*(1-4*x)).
a(n) = 9*a(n-1) - 26*a(n-2) + 24*a(n-3).
a(n) = A006516(n) + A000244(n).
E.g.f.: exp(3*x)*(1 + sinh(x)). - G. C. Greubel, Sep 26 2024

A352419 Triangle read by rows T(n,k): number of three-in-a-rows in n-dimensional tic-tac-toe through a cell that is central in k dimensions (for k=0..n).

Original entry on oeis.org

0, 1, 1, 3, 2, 4, 7, 4, 5, 13, 15, 8, 7, 14, 40, 31, 16, 11, 16, 41, 121, 63, 32, 19, 20, 43, 122, 364, 127, 64, 35, 28, 47, 124, 365, 1093, 255, 128, 67, 44, 55, 128, 367, 1094, 3280, 511, 256, 131, 76, 71, 136, 371, 1096, 3281, 9841, 1023, 512, 259, 140, 103, 152, 379, 1100, 3283, 9842, 29524
Offset: 0

Views

Author

Ben Orlin, Mar 15 2022

Keywords

Comments

A tic-tac-toe board in n dimensions consists of 3^n cells. Each cell is central (between others) in k dimensions and extremal (not between others) in n-k dimensions. In standard n=2 tic-tac-toe, k=0 gives a corner, k=2 gives the center, and k=1 gives an edge.
A000225 gives the first term in each row: a(n) is the number of three-in-a-rows passing through corner cells in n-dimensional tic-tac-toe = 2^n - 1.
A003462 gives the final term in each row: a(n) is the number of three-in-a-rows passing through the center cell in n-dimensional tic-tac-toe = (3^n - 1)/2.
A007051 gives the penultimate term in each row: a(n) is the number of three-in-a-rows passing through a cell in n-dimensional tic-tac-toe that is central in n - 1 dimensions and extremal in 1 dimension = (3^(n-1))/2 + 1.
A170804 gives the minimum of each row: a(n) is the smallest number of three-in-a-rows passing through any cell in n-dimensional tic-tac-toe.
A094374 -1 gives the central values of even rows: a(n) - 1 is the number of three-in-a-rows passing through a cell in 2n-dimensional tic-tac-toe that is central in n dimensions and extremal in n dimensions = (2^n - 1) + (3^n - 1)/2.

Examples

			Table begins:
   0;
   1,  1;
   3,  2,  4;
   7,  4,  5, 13;
  15,  8,  7, 14, 40;
  31, 16, 11, 16, 41, 121;
  63, 32, 19, 20, 43, 122, 364;
		

Crossrefs

Formula

T(n,k) = (3^k - 1)/2 + 2^(n-k) - 1.
Showing 1-5 of 5 results.