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.

A064225 a(n) = (9*n^2 + 5*n + 2)/2.

Original entry on oeis.org

1, 8, 24, 49, 83, 126, 178, 239, 309, 388, 476, 573, 679, 794, 918, 1051, 1193, 1344, 1504, 1673, 1851, 2038, 2234, 2439, 2653, 2876, 3108, 3349, 3599, 3858, 4126, 4403, 4689, 4984, 5288, 5601, 5923, 6254, 6594, 6943, 7301, 7668, 8044, 8429, 8823, 9226
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2001

Keywords

Comments

Diagonal of triangular spiral in A051682. - Michael Somos, Jul 22 2006
Ehrhart polynomial of closed quadrilateral with vertices (0,2),(2,3),(3,1),(2,0). - Michael Somos, Jul 22 2006
In the natural number array A000027 this sequence is the first knight moves diagonal (A081267 is the second, A001844 is the main diagonal). It can be used to define this diagonal for any array: A007318(A064225-1)=A005809 (Subtraction by 1 because A007318 is defined with offset 0.) - Tilman Piesk, Mar 24 2012
Or positions of pentagonal numbers, such that p(a(n)) = p(a(n)-1) + p(3*n+1), where p=A000326. - Vladimir Shevelev, Jan 21 2014

Examples

			Illustration of initial terms:
.
.                                    o
.                                 o o
.                      o       o o o o
.                   o o     o o o o o
.           o    o o o o     o o o o o
.        o o      o o o     o o o o o
.   o     o o    o o o o     o o o o o
.        o o      o o o     o o o o o
.           o    o o o o     o o o o o
.                   o o     o o o o o
.                      o       o o o o
.                                 o o
.                                    o
.
.   1     8        24           49
- _Aaron David Fairbanks_, Feb 23 2025
		

Crossrefs

Programs

  • Mathematica
    Table[(9n^2+5n+2)/2,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{1,8,24},51] (* Harvey P. Dale, Sep 13 2011 *)
  • PARI
    {a(n) = 1 + n * (9*n + 5) / 2}; /* Michael Somos, Jul 22 2006 */
    
  • Scheme
    (define (A064225 n) (/ (+ (* 9 n n) (* 5 n) 2) 2))

Formula

a(n) = 9*n+a(n-1)-2, with n>0, a(0) = 1. - Vincenzo Librandi, Aug 07 2010
a(0)=1, a(1)=8, a(2)=24, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Sep 13 2011
G.f.: (1+5*x+3*x^2)/(1-x)^3. - Colin Barker, Feb 23 2012
A064226(n) = a(-1-n). - Michael Somos, Jul 22 2006 (While the sequence itself is only one-way infinite, this identity works, as the defining formula (in the Name-field) produces integers also for the negative values of n, -1, -2, -3, etc.) - Antti Karttunen, Mar 24 2012
E.g.f.: exp(x)*(2 + 14*x + 9*x^2)/2. - Stefano Spezia, Dec 25 2022

A051736 Number of 3 X n (0,1)-matrices with no consecutive 1's in any row or column.

Original entry on oeis.org

1, 5, 17, 63, 227, 827, 2999, 10897, 39561, 143677, 521721, 1894607, 6879979, 24983923, 90725999, 329460929, 1196397873, 4344577397, 15776816033, 57291635519, 208047769363, 755500774443, 2743511349031, 9962735709201, 36178491743225, 131377896967213, 477083233044745
Offset: 0

Views

Author

Stephen G Penrice, Dec 06 1999

Keywords

Comments

Also the number of independent vertex sets and vertex covers in the 3 X n grid graph. - Eric W. Weisstein, Sep 21 2017

Examples

			There are five 3 X 1 (0,1)-matrices with no consecutive 1's:
  0 0 0
  0 0 1
  0 1 0
  1 0 0
  1 0 1
There are 17 3 X 2 (0,1)-matrices with no consecutive 1's:
0 0, 0 1, 0 0, 0 0, 0 1, 1 0, 1 0, 1 0, 0 0, 0 1, 0 0, 0 1, 0 0, 0 1, 0 0, 1 0, 1 0
0 0, 0 0, 0 1, 0 0, 0 0, 0 0, 0 1, 0 0, 1 0, 1 0, 1 0, 1 0, 0 0, 0 0, 0 1, 0 0, 0 1
0 0, 0 0, 0 0, 0 1, 0 1, 0 0, 0 0, 0 1, 0 0, 0 0, 0 1, 0 1, 1 0, 1 0, 1 0, 1 0, 1 0
		

Crossrefs

Row 3 of A089934. Row sums of A371967.
Cf. A051737.

Programs

  • Haskell
    a051736 n = a051736_list !! (n-1)
    a051736_list = 1 : 5 : 17 : 63 : zipWith (-) (map (* 2) $ drop 2 $
       zipWith (+) (map (* 3) a051736_list) (tail a051736_list)) a051736_list
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Mathematica
    LinearRecurrence[{2, 6, 0, -1}, {1, 5, 17, 63}, 40] (* Harvey P. Dale, Mar 05 2013 *)
    CoefficientList[Series[(1 + 3 x + x^2 - x^3)/(1 - 2 x - 6 x^2 + x^4), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    Table[-RootSum[1 - 6 #1^2 - 2 #1^3 + #1^4 &, 263 #1^n - 657 #1^(n + 1) - 331 #1^(n + 2) + 81 #1^(n + 3) &]/1994, {n, 0, 20}] (* Eric W. Weisstein, Sep 21 2017 *)
  • PARI
    Vec((1+3*x+x^2-x^3)/(1-2*x-6*x^2+x^4)+O(x^50)) \\ Michel Marcus, Sep 17 2014

Formula

a(n) = 2*a(n-1) + 6*a(n-2) - a(n-4).
G.f.: (1+x)*(1+2*x-x^2)/(1-2*x-6*x^2+x^4). - Philippe Deléham, Sep 07 2006

Extensions

More terms from James Sellers, Dec 08 1999
More terms from Michel Marcus, Sep 17 2014
Offset fixed by Eric W. Weisstein, Sep 21 2017

A172229 Number of ways to place 3 nonattacking wazirs on a 3 X n board.

Original entry on oeis.org

0, 2, 22, 84, 215, 442, 792, 1292, 1969, 2850, 3962, 5332, 6987, 8954, 11260, 13932, 16997, 20482, 24414, 28820, 33727, 39162, 45152, 51724, 58905, 66722, 75202, 84372, 94259, 104890, 116292, 128492, 141517, 155394, 170150, 185812, 202407, 219962, 238504
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

Crossrefs

Column w=3 of A371967.

Programs

  • Mathematica
    CoefficientList[Series[x (3 x^3 + 8 x^2 + 14 x + 2) / (x - 1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (3*n - 5)*(3*n^2 - 8*n + 8)/2, n>=2.
G.f.: x^2*(3*x^3+8*x^2+14*x+2)/(x-1)^4. - Vaclav Kotesovec, Mar 25 2010

A371978 Number of ways of placing n non-attacking wazirs on a 3 X n board.

Original entry on oeis.org

1, 3, 8, 22, 61, 174, 504, 1478, 4374, 13035, 39062, 117585, 355279, 1076845, 3272692, 9969385, 30430982, 93055869, 285013326, 874193006, 2684778104, 8254967674, 25408703236, 78283452265, 241403160254, 745024894092, 2301051484006, 7111897305089, 21995136183906
Offset: 0

Views

Author

Alois P. Heinz, Apr 14 2024

Keywords

Examples

			a(2) = 8:
  +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
  | W . | | W . | | W . | | . W | | . W | | . W | | . . | | . . |
  | . W | | . . | | . . | | W . | | . . | | . . | | W . | | . W |
  | . . | | W . | | . W | | . . | | W . | | . W | | . W | | W . |
  +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ .
		

Crossrefs

Main diagonal of A371967.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(Bits[And](j, l)>0, 0, expand(b(n-1, j)*
          x^add(i, i=Bits[Split](j)))), j=[0, 1, 2, 4, 5]))
        end:
    a:= n-> coeff(b(n, 0), x, n):
    seq(a(n), n=0..30);

Formula

a(n) = A371967(n,n).
From Vaclav Kotesovec, Apr 16 2024: (Start)
Recurrence: (n+1)*(72*n^4 - 700*n^3 + 2288*n^2 - 2803*n + 796)*a(n) = 2*(144*n^5 - 1328*n^4 + 3814*n^3 - 3083*n^2 - 1479*n + 1194)*a(n-1) - 2*(72*n^5 - 700*n^4 + 2050*n^3 - 1979*n^2 + 409*n + 16)*a(n-2) - 4*(36*n^5 - 368*n^4 + 1437*n^3 - 2421*n^2 + 1398*n + 95)*a(n-3) - (72*n^5 - 772*n^4 + 2404*n^3 - 1365*n^2 - 4749*n + 5704)*a(n-4) + 2*(72*n^5 - 808*n^4 + 2858*n^3 - 3067*n^2 - 1494*n + 2666)*a(n-5) - (n-6)*(72*n^4 - 412*n^3 + 620*n^2 - 39*n - 347)*a(n-6).
a(n) ~ sqrt(c) * d^n / sqrt(Pi*n), where d = (188 + 12*sqrt(93))^(1/3)/6 + 14/(3*(188 + 12*sqrt(93))^(1/3)) + 4/3 and c = 11/6 + (1465336244224 - 5597165568*sqrt(93))^(1/3)/5952 + ((23080523 + 88161*sqrt(93))/2)^(1/3) / (12*31^(2/3)). (End)

A371979 Number of ways of placing k non-attacking wazirs on a 3 X n board, where k is chosen so as to maximize this number.

Original entry on oeis.org

1, 3, 8, 24, 84, 276, 880, 3063, 10692, 36257, 121580, 436847, 1530534, 5259906, 18389910, 65748491, 230935493, 799429185, 2860613606, 10203350814, 35899202776, 125660232367, 453360413253, 1614905346286, 5688690345179, 20241845359246, 72805688610204
Offset: 0

Views

Author

Alois P. Heinz, Apr 14 2024

Keywords

Examples

			a(3) = 24 = A371967(3,2):
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  | W . W | | W . . | | W . . | | W . . | | W . . | | W . . |
  | . . . | | . W . | | . . W | | . . . | | . . . | | . . . |
  | . . . | | . . . | | . . . | | W . . | | . W . | | . . W |
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  | . W . | | . W . | | . W . | | . W . | | . W . | | . . W |
  | W . . | | . . W | | . . . | | . . . | | . . . | | W . . |
  | . . . | | . . . | | W . . | | . W . | | . . W | | . . . |
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  | . . W | | . . W | | . . W | | . . W | | . . . | | . . . |
  | . W . | | . . . | | . . . | | . . . | | W . W | | W . . |
  | . . . | | W . . | | . W . | | . . W | | . . . | | . W . |
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+
  | . . . | | . . . | | . . . | | . . . | | . . . | | . . . |
  | W . . | | . W . | | . W . | | . . W | | . . W | | . . . |
  | . . W | | W . . | | . . W | | W . . | | . W . | | W . W |
  +-------+ +-------+ +-------+ +-------+ +-------+ +-------+ .
		

Crossrefs

Row maxima of A371967.
Cf. A371978.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(Bits[And](j, l)>0, 0, expand(b(n-1, j)*
          x^add(i, i=Bits[Split](j)))), j=[0, 1, 2, 4, 5]))
        end:
    a:= n-> max(coeffs(b(n, 0))):
    seq(a(n), n=0..30);
Showing 1-5 of 5 results.