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.

A131831 Duplicate of A100314.

Original entry on oeis.org

1, 4, 8, 14, 24, 42, 76, 142, 272, 530, 1044, 2070, 4120, 8218, 16412, 32798, 65568, 131106, 262180, 524326, 1048616, 2097194, 4194348, 8388654, 16777264, 33554482, 67108916
Offset: 0

Views

Author

Keywords

A052548 a(n) = 2^n + 2.

Original entry on oeis.org

3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The most "compact" sequence that satisfies Bertrand's Postulate. Begin with a(1) = 3 = n, then 2n - 2 = 4 = n_1, 2n_1 - 2 = 6 = n_2, 2n_2 - 2 = 10, etc. = a(n), hence there is guaranteed to be at least one prime between successive members of the sequence. - Andrew S. Plewe, Dec 11 2007
Number of 2-sided prudent polygons of area n, for n>0, see Beaton, p. 5. - Jonathan Vos Post, Nov 30 2010

Crossrefs

Programs

  • Haskell
    a052548 = (+ 2) . a000079
    a052548_list = iterate ((subtract 2) . (* 2)) 3
    -- Reinhard Zumkeller, Sep 05 2015
  • Magma
    [2^n + 2: n in [0..35]]; // Vincenzo Librandi, Apr 29 2011
    
  • Maple
    spec := [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Z),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    2^Range[0,40]+2 (* Harvey P. Dale, Jun 26 2012 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Nov 20 2011
    

Formula

G.f.: (3-5*x)/((1-2*x)*(1-x)) = (3-5*x)/(1 - 3*x + 2*x^2) = 2/(1-x) + 1/(1-2*x).
a(0)=3, a(1)=4, a(n) = 3*a(n-1) - 2*a(n-2).
a(n) = A058896(n)/A000918(n), for n>0. - Reinhard Zumkeller, Feb 14 2009
a(n) = A173786(n,1), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(n)*A000918(n) = A028399(2*n), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(0)=3, a(n) = 2*a(n-1) - 2. - Vincenzo Librandi, Aug 06 2010
E.g.f.: (2 + exp(x))*exp(x). - Ilya Gutkovskiy, Aug 16 2016

Extensions

More terms from James Sellers, Jun 06 2000

A131830 Triangle read by rows: T(n,0) = T(n,n) = n + 1 for n >= 0, and T(n,k) = binomial(n,k) for 1 <= k <= n - 1, n >= 2.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 5, 4, 6, 4, 5, 6, 5, 10, 10, 5, 6, 7, 6, 15, 20, 15, 6, 7, 8, 7, 21, 35, 35, 21, 7, 8, 9, 8, 28, 56, 70, 56, 28, 8, 9, 10, 9, 36, 84, 126, 126, 84, 36, 9, 10, 11, 10, 45, 120, 210, 252, 210, 120, 45, 10, 11, 12, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 12
Offset: 0

Views

Author

Gary W. Adamson, Jul 20 2007

Keywords

Comments

Given Pascal's triangle, replace the two (1, 1, 1, ...) borders with (1, 2, 3, ...).

Examples

			First few rows of the triangle are:
  1;
  2, 2;
  3, 2,  3;
  4, 3,  3,  4;
  5, 4,  6,  4,  5;
  6, 5, 10, 10,  5, 6;
  7, 6, 15, 20, 15, 6, 7;
  ...
		

Crossrefs

Row sums: A100314.

Programs

  • Mathematica
    Flatten[Table[If[Or[k==n,k==0], n+1, Binomial[n, k]], {n, 0, 11}, {k, 0, n}]] (* Georg Fischer, Feb 18 2020 *)
  • Maxima
    T(n, k) := if k = 0 or k = n then n + 1 else binomial(n, k)$
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Dec 19 2018 */

Formula

T(n,k) = A131821(n,k) + A007318(n,k) - 1.
From Franck Maminirina Ramaharo, Dec 19 2018: (Start)
G.f.: (1 - (1 + x)*y - 2*x*y^2 + (3*x + 3*x^2)*y^3 - (x + x^2 + x^3)*y^4)/((1 - y)^2*(1 - x*y)^2*(1 - y - x*y)).
E.g.f.: y*exp(y) + (x*y + exp(y))*exp(x*y). (End)

Extensions

Edited by Franck Maminirina Ramaharo, Dec 19 2018
B-file corrected from a(1678) onwards by Georg Fischer, Feb 18 2020

A173740 Triangle T(n,k) = binomial(n,k) + 2 for 1 <= k <= n - 1, n >= 2, and T(n,0) = T(n,n) = 1 for n >= 0, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 6, 8, 6, 1, 1, 7, 12, 12, 7, 1, 1, 8, 17, 22, 17, 8, 1, 1, 9, 23, 37, 37, 23, 9, 1, 1, 10, 30, 58, 72, 58, 30, 10, 1, 1, 11, 38, 86, 128, 128, 86, 38, 11, 1, 1, 12, 47, 122, 212, 254, 212, 122, 47, 12, 1, 1, 13, 57, 167, 332, 464, 464, 332, 167, 57, 13, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 23 2010

Keywords

Comments

For n >= 1, row n sums to A131520(n).

Examples

			Triangle begins:
  1;
  1,  1;
  1,  4,  1;
  1,  5,  5,   1;
  1,  6,  8,   6,   1;
  1,  7, 12,  12,   7,   1;
  1,  8, 17,  22,  17,   8,   1;
  1,  9, 23,  37,  37,  23,   9,   1;
  1, 10, 30,  58,  72,  58,  30,  10,  1;
  1, 11, 38,  86, 128, 128,  86,  38, 11,  1;
  1, 12, 47, 122, 212, 254, 212, 122, 47, 12, 1;
  ...
		

Crossrefs

Sequences of the form binomial(n, k) + q: A132823 (q=-2), A132044 (q=-1), A007318 (q=0), A132735 (q=1), this sequence (q=2), A173741 (q=4), A173742 (q=6).

Programs

  • Magma
    T:= func< n,k | k eq 0 or k eq n select 1 else Binomial(n,k) + 2 >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 13 2021
  • Mathematica
    T[n_, m_] = Binomial[n, m] + 2*If[m*(n - m) > 0, 1, 0];
    Flatten[Table[T[n, m], {n, 0, 10}, {m, 0, n}]]
  • Maxima
    T(n,k) := if k = 0 or k = n then 1 else binomial(n, k) + 2$
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Dec 08 2018 */
    
  • Sage
    def T(n, k): return 1 if (k==0 or k==n) else binomial(n, k) + 2
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 13 2021
    

Formula

From Franck Maminirina Ramaharo, Dec 08 2018:(Start)
T(n,k) = A007318(n,k) + 2*(1 - A103451(n,k)).
T(n,k) = 3*A007318(n,k) - 2*A132044(n,k).
n-th row polynomial is 1 - (-1)^(2^n) + (1 + x)^n + 2*(x - x^n)/(1 - x).
G.f.: (1 - (1 + x)*y + 3*x*y^2 - 2*(x + x^2)*y^3)/((1 - y)*(1 - x*y)*(1 - y - x*y)).
E.g.f.: (2 - 2*x + 2*x*exp(y) - 2*exp(x*y) + (1 - x)*exp((1 + x)*y))/(1 - x). (End)
Sum_{k=0..n} T(n, k) = 2^n + 2*(n - 1 + [n=0]) = 2*A100314(n). - G. C. Greubel, Feb 13 2021

Extensions

Edited and name clarified by Franck Maminirina Ramaharo, Dec 08 2018

A100315 Number of 3 X n 0-1 matrices avoiding simultaneously the right angled numbered polyomino patterns (ranpp) (00;1), (01;0), (10;0) and (01;1).

Original entry on oeis.org

1, 8, 14, 22, 34, 54, 90, 158, 290, 550, 1066, 2094, 4146, 8246, 16442, 32830, 65602, 131142, 262218, 524366, 1048658, 2097238, 4194394, 8388702, 16777314, 33554534, 67108970, 134217838, 268435570, 536871030, 1073741946, 2147483774, 4294967426, 8589934726
Offset: 0

Views

Author

Sergey Kitaev, Nov 13 2004

Keywords

Comments

An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2, j1 < j2 and these elements are in the same relative order as those in the triple (x,y,z). In general, the number of m X n 0-1 matrices in question is given by 2^m + 2^n + 2*(n*m-n-m).

Crossrefs

Cf. A100314 (m=2), this sequence (m=3), A100316 (m=4).

Programs

Formula

a(n) = 2^n + 4*n + 2 for n>0, a(0)=1.
From Chai Wah Wu, Aug 26 2016: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) for n > 3.
G.f.: 1 + 2*x*(4 - 9*x + 3*x^2)/((1-x)^2*(1-2*x)). (End)
E.g.f.: exp(2*x) + 2*(1+2*x)*exp(x) - 2. - G. C. Greubel, Feb 01 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 21 2018

A173741 T(n,k) = binomial(n,k) + 4 for 1 <= k <= n - 1, n >= 2, and T(n,0) = T(n,n) = 1 for n >= 0, triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 7, 7, 1, 1, 8, 10, 8, 1, 1, 9, 14, 14, 9, 1, 1, 10, 19, 24, 19, 10, 1, 1, 11, 25, 39, 39, 25, 11, 1, 1, 12, 32, 60, 74, 60, 32, 12, 1, 1, 13, 40, 88, 130, 130, 88, 40, 13, 1, 1, 14, 49, 124, 214, 256, 214, 124, 49, 14, 1, 1, 15, 59, 169, 334, 466, 466, 334, 169, 59, 15, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 23 2010

Keywords

Comments

For n >= 1, row n sums to 2*A100314(n).

Examples

			Triangle begins:
  1;
  1,  1;
  1,  6,  1;
  1,  7,  7,   1;
  1,  8, 10,   8,   1;
  1,  9, 14,  14,   9,   1;
  1, 10, 19,  24,  19,  10,   1;
  1, 11, 25,  39,  39,  25,  11,   1;
  1, 12, 32,  60,  74,  60,  32,  12,  1;
  1, 13, 40,  88, 130, 130,  88,  40, 13,  1;
  1, 14, 49, 124, 214, 256, 214, 124, 49, 14, 1;
  ...
		

Crossrefs

Sequences of the form binomial(n, k) + q: A132823 (q=-2), A132044 (q=-1), A007318 (q=0), A132735 (q=1), A173740 (q=2), this sequence (q=4), A173742 (q=6).

Programs

  • Magma
    T:= func< n,k | k eq 0 or k eq n select 1 else Binomial(n,k) + 4 >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 13 2021
  • Mathematica
    T[n_, m_] = Binomial[n, m] + 4*If[m*(n - m) > 0, 1, 0];
    Flatten[Table[T[n, m], {n, 0, 10}, {m, 0, n}]]
  • Maxima
    T(n,k) := if k = 0 or k = n then 1 else binomial(n, k) + 4$
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Dec 09 2018 */
    
  • Sage
    def T(n, k): return 1 if (k==0 or k==n) else binomial(n, k) + 4
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 13 2021
    

Formula

From Franck Maminirina Ramaharo, Dec 09 2018:(Start)
T(n,k) = A007318(n,k) + 2*(1 - A103451(n,k)).
T(n,k) = 5*A007318(n,k) - 4*A132044(n,k).
n-th row polynomial is 2*(1 - (-1)^(2^n)) + (1 + x)^n + 4*(x - x^n)/(1 - x).
G.f.: (1 - (1 + x)*y + 5*x*y^2 - 4*(x + x^2)*y^3)/((1 - y)*(1 - x*y)*(1 - y - x*y)).
E.g.f.: (4 - 4*x + 4*x*exp(y) - 4*exp(x*y) + (1 - x)*exp((1 + x)*y))/(1 - x). (End)
Sum_{k=0..n} T(n, k) = 2^n + 4*(n - 1 + [n=0]) = 2*A100314(n). - G. C. Greubel, Feb 13 2021

Extensions

Edited and name clarified by Franck Maminirina Ramaharo, Dec 09 2018

A100316 Number of 4 X n 0-1 matrices avoiding simultaneously the right angled numbered polyomino patterns (ranpp) (00;1), (01;0), (10;0) and (01;1).

Original entry on oeis.org

1, 16, 24, 34, 48, 70, 108, 178, 312, 574, 1092, 2122, 4176, 8278, 16476, 32866, 65640, 131182, 262260, 524410, 1048704, 2097286, 4194444, 8388754, 16777368, 33554590, 67109028, 134217898, 268435632, 536871094, 1073742012, 2147483842, 4294967496, 8589934798
Offset: 0

Views

Author

Sergey Kitaev, Nov 13 2004

Keywords

Comments

An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2, j1 < j2 and these elements are in the same relative order as those in the triple (x,y,z). In general, the number of m X n 0-1 matrices in question is given by 2^m + 2^n + 2*(n*m-n-m).

Crossrefs

Cf. A100314 (m=2), A100315 (m=3), this sequence (m=4).

Programs

Formula

a(n) = 2^n + 6*n + 8 for n>0, a(0) = 1.
G.f.: (1+12*x-35*x^2+16*x^3)/((1-2*x)*(1-x)^2). - Alois P. Heinz, Dec 21 2018
E.g.f.: exp(2*x) + 2*(4+3*x)*exp(x) - 8. - G. C. Greubel, Feb 01 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 21 2018

A321123 a(n) = 2^n + 2*n^2 + 2*n + 1.

Original entry on oeis.org

2, 7, 17, 33, 57, 93, 149, 241, 401, 693, 1245, 2313, 4409, 8557, 16805, 33249, 66081, 131685, 262829, 525049, 1049417, 2098077, 4195317, 8389713, 16778417, 33555733, 67110269, 134219241, 268437081, 536872653, 1073743685, 2147485633, 4294969409, 8589936837
Offset: 0

Views

Author

Keywords

Comments

For n >= 2, a(n) is the number of evaluation points on the n-dimensional cube in Genz and Malik's degree 7 cubature rule.

Crossrefs

Programs

  • Magma
    [2^n + 2*n^2 + 2*n + 1: n in [0..33]]; // Marius A. Burtea, Dec 28 2018
  • Mathematica
    Table[2^n + 2*n^2 + 2*n + 1, {n, 0, 50}]
  • Maxima
    makelist(2^n + 2*n^2 + 2*n + 1, n, 0, 50);
    

Formula

a(n) = A000079(n) + A001844(n).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4), n >= 4.
G.f.: (2 - 3*x - 3*x^3)/((1 - 2*x)*(1 - x)^3).
E.g.f.: exp(2*x) + (1 + 4*x + 2*x^2)*exp(x).

A322593 a(n) = 2^n + 2*n^2 + 1.

Original entry on oeis.org

2, 5, 13, 27, 49, 83, 137, 227, 385, 675, 1225, 2291, 4385, 8531, 16777, 33219, 66049, 131651, 262793, 525011, 1049377, 2098035, 4195273, 8389667, 16778369, 33555683, 67110217, 134219187, 268437025, 536872595, 1073743625, 2147485571, 4294969345, 8589936771
Offset: 0

Views

Author

Keywords

Comments

For n = 3..7, a(n) is the number of evaluating points on the n-dimensional sphere (also n-space with weight function exp(-r^2) or exp(-r)) in a degree 7 cubature rule.

References

  • Arthur H. Stroud, Approximate calculation of multiple integrals, Prentice-Hall, 1971.

Crossrefs

Programs

  • Magma
    [2^n + 2*n^2 + 1: n in [0..33]]; // Marius A. Burtea, Dec 28 2018
  • Mathematica
    Table[2^n + 2*n^2 + 1, {n, 0, 50}]
    LinearRecurrence[{5,-9,7,-2},{2,5,13,27},50] (* Harvey P. Dale, Mar 23 2021 *)
  • Maxima
    makelist(2^n + 2*n^2 + 1, n, 0, 50);
    

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n >= 4.
a(n) = a(n-1) + A100315(n-1), n >= 2.
G.f.: (2 - 5*x + 6*x^2 - 7*x^3)/((1 - 2*x)*(1 - x)^3)
E.g.f.: exp(2*x) + (1 + 2*x + 2*x^2)*exp(x).

A340849 a(n) = A001045(n) + A052928(n).

Original entry on oeis.org

0, 1, 3, 5, 9, 15, 27, 49, 93, 179, 351, 693, 1377, 2743, 5475, 10937, 21861, 43707, 87399, 174781, 349545, 699071, 1398123, 2796225, 5592429, 11184835, 22369647, 44739269, 89478513, 178956999, 357913971, 715827913
Offset: 0

Views

Author

Paul Curtz, Jan 24 2021

Keywords

Comments

a(2*n) is divisible by 3.
a(3*n+2) is divisible by 3.
a(n) is the minimum number of moves to solve a Towers of Hanoi puzzle with 4 pegs and n disks where a disk cannot move away from the destination peg (or symmetrically, a disk cannot return to the initial peg). - Woosuk Kwak, Jan 25 2024

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -1, -3, 2}, {0, 1, 3, 5}, 32] (* Robert P. P. McKone, Jan 28 2021 *)

Formula

a(n+1) - 2*a(n) = -A109613(n-2), for a(0)=0, a(1)=1. a(n) + a(n+1) = A100314(n).
a(n+1) - a(n) = A128209(n) for n >= 0.
a(n+2) = 1 + 2*A086445(n). - Hugo Pfoertner, Jan 24 2021
From Woosuk Kwak, Jan 25 2024: (Start)
a(n) = n + floor(2^n/3).
a(n) = n + A000975(n-1) for n >= 1. (End)
Showing 1-10 of 10 results.