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-8 of 8 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

A064226 a(n) = (9*n^2 + 13*n + 6)/2.

Original entry on oeis.org

3, 14, 34, 63, 101, 148, 204, 269, 343, 426, 518, 619, 729, 848, 976, 1113, 1259, 1414, 1578, 1751, 1933, 2124, 2324, 2533, 2751, 2978, 3214, 3459, 3713, 3976, 4248, 4529, 4819, 5118, 5426, 5743, 6069, 6404, 6748, 7101, 7463, 7834, 8214, 8603, 9001, 9408, 9824
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2001

Keywords

Comments

Diagonal of triangular spiral in A051682. - Paul Barry, Mar 15 2003
Ehrhart polynomial of open quadrilateral with vertices (0,2),(2,3),(3,1),(2,0). - Michael Somos, Jul 22 2006

Crossrefs

Programs

  • Magma
    I:=[3,14,34]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jul 19 2015
  • Maple
    A064226:=n-> (9*n^2 + 13*n + 6) / 2; seq(A064226(n), n=0..50); # Wesley Ivan Hurt, May 08 2014
  • Mathematica
    Table[(9 n^2 + 13 n + 6)/2, {n, 0, 50}] (* Wesley Ivan Hurt, May 08 2014 *)
    LinearRecurrence[{3, -3, 1}, {3, 14, 34}, 50] (* Vincenzo Librandi, Jul 19 2015 *)
  • PARI
    {a(n) = 3 + n * (9*n + 13) / 2}; /* Michael Somos, Jul 22 2006 */
    

Formula

From Paul Barry, Mar 15 2003: (Start)
a(n) = 3*C(n,0) + 11*C(n,1) + 9*C(n,2); binomial transform of (3, 11, 9, 0, 0, 0, ...).
G.f.: (3 + 5*x + x^2)/(1-x)^3.
a(n) = A081268(n) + 2. (End)
A064225(n) = a(-1-n). - Michael Somos, Jul 22 2006
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Apr 16 2023
E.g.f.: (3 + 11*x + 9*x^2/2)*exp(x). - Elmo R. Oliveira, Oct 21 2024

A220083 a(n) = (15*n^2 + 9*n + 2)/2.

Original entry on oeis.org

1, 13, 40, 82, 139, 211, 298, 400, 517, 649, 796, 958, 1135, 1327, 1534, 1756, 1993, 2245, 2512, 2794, 3091, 3403, 3730, 4072, 4429, 4801, 5188, 5590, 6007, 6439, 6886, 7348, 7825, 8317, 8824, 9346, 9883, 10435, 11002, 11584, 12181, 12793, 13420, 14062
Offset: 0

Views

Author

Bruno Berselli, Dec 10 2012

Keywords

Comments

Sequence related to the heptagonal numbers (A000566) by a(n) = n*A000566(n)-(n-1)*A000566(n-1).
Other similar sequences:
A005408(m) = (m+1)*A001477(m+1)-m*A001477(m), A001477 = nonn. integers;
A000326(m) = m*A000217(n)-(m-1)*A000217(m-1), A000217 = triangular numbers;
A003215(m) = (m+1)*A000290(m+1)-n*A000290(m), A000290 = square numbers;
A081267(m) = (m+1)*A000326(m+1)-n*A000326(m), A000326 = pentagonal numbers;
A080859(m) = (m+1)*A000384(m+1)-n*A000384(m), A000384 = hexagonal numbers;
A214675(m) = m*A000567(m)-(m-1)*A000567(m-1), A000567 = octagonal numbers.

Crossrefs

Programs

Formula

G.f.: (1+10*x+4*x^2)/(1-x)^3.
Sum( a(i), i=0..n ) = A006597(n+1).
a(n) + a(-n) = A010005(n) for n>0.

A235332 a(n) = n*(9*n + 25)/2 + 6.

Original entry on oeis.org

6, 23, 49, 84, 128, 181, 243, 314, 394, 483, 581, 688, 804, 929, 1063, 1206, 1358, 1519, 1689, 1868, 2056, 2253, 2459, 2674, 2898, 3131, 3373, 3624, 3884, 4153, 4431, 4718, 5014, 5319, 5633, 5956, 6288, 6629, 6979, 7338, 7706, 8083, 8469, 8864, 9268, 9681, 10103
Offset: 0

Views

Author

Bruno Berselli, Jan 22 2014

Keywords

Comments

This is the case d=6 of n*(9*n + 4*d + 1)/2 + d. Other similar sequences are:
d=0, A022267;
d=1, A064225;
d=2, A062123;
d=3, A064226;
d=4, A022266 (with initial 0);
d=5, A178977.
First bisection of A235537.

Crossrefs

Programs

  • Magma
    [n*(9*n+25)/2+6: n in [0..50]];
    
  • Mathematica
    Table[n (9 n + 25)/2 + 6, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{6,23,49},50] (* Harvey P. Dale, Feb 12 2022 *)
  • PARI
    a(n)=n*(9*n+25)/2+6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (6 + 5*x - 2*x^2)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
2*a(n) - a(n+1) + 12 = A081267(n).
E.g.f.: exp(x)*(12 + 34*x + 9*x^2)/2. - Elmo R. Oliveira, Nov 13 2024

A214230 Sum of the eight nearest neighbors of n in a right triangular type-1 spiral with positive integers.

Original entry on oeis.org

53, 88, 78, 125, 85, 84, 125, 97, 108, 143, 223, 168, 158, 169, 201, 284, 208, 183, 179, 187, 210, 281, 226, 219, 227, 235, 261, 314, 430, 339, 311, 310, 318, 326, 346, 396, 515, 403, 360, 347, 355, 363, 371, 379, 411, 509, 427, 411, 419, 427, 435, 443, 451, 486, 557
Offset: 1

Views

Author

Alex Ratushnyak, Jul 08 2012

Keywords

Comments

Right triangular type-1 spiral implements the sequence Up, Right-down, Left.
Right triangular type-2 spiral (A214251): Left, Up, Right-down.
Right triangular type-3 spiral (A214252): Right-down, Left, Up.
A140064 -- rightwards from 1: 3,14,34...
A064225 -- leftwards from 1: 8,24,49...
A117625 -- upwards from 1: 2,12,31...
A006137 -- downwards from 1: 6,20,43...
A038764 -- left-down from 1: 7,22,46...
A081267 -- left-up from 1: 9,26,52...
A081589 -- right-up from 1: 13, 61, 145...
9*x^2/2 - 19*x/2 + 6 -- right-down from 1: 5,18,40...

Examples

			Right triangular spiral begins:
56
55  57
54  29  58
53  28  30  59
52  27  11  31  60
51  26  10  12  32  61
50  25   9   2  13  33  62
49  24   8   1   3  14  34  63
48  23   7   6   5   4  15  35  64
47  22  21  20  19  18  17  16  36  65
46  45  44  43  42  41  40  39  38  37  66
78  77  76  75  74  73  72  71  70  69  68  67
The eight nearest neighbors of 3 are 1, 2, 13, 33, 14, 4, 5, 6. Their sum is a(3)=78.
		

Crossrefs

Programs

  • Python
    SIZE=29  # must be odd
    grid = [0] * (SIZE*SIZE)
    saveX = [0]* (SIZE*SIZE)
    saveY = [0]* (SIZE*SIZE)
    saveX[1] = saveY[1] = posX = posY = SIZE//2
    grid[posY*SIZE+posX]=1
    n = 2
    def walk(stepX,stepY,chkX,chkY):
      global posX, posY, n
      while 1:
        posX+=stepX
        posY+=stepY
        grid[posY*SIZE+posX]=n
        saveX[n]=posX
        saveY[n]=posY
        n+=1
        if posY==0 or grid[(posY+chkY)*SIZE+posX+chkX]==0:
            return
    while 1:
        walk(0, -1,  1,  1)    # up
        if posY==0:
            break
        walk( 1, 1, -1,  0)    # right-down
        walk(-1, 0,  0, -1)    # left
    for n in range(1,92):
        posX = saveX[n]
        posY = saveY[n]
        k = grid[(posY-1)*SIZE+posX] + grid[(posY+1)*SIZE+posX]
        k+= grid[(posY-1)*SIZE+posX-1] + grid[(posY-1)*SIZE+posX+1]
        k+= grid[(posY+1)*SIZE+posX-1] + grid[(posY+1)*SIZE+posX+1]
        k+= grid[posY*SIZE+posX-1] + grid[posY*SIZE+posX+1]
        print(k, end=', ')

A081268 Diagonal of triangular spiral in A051682.

Original entry on oeis.org

1, 12, 32, 61, 99, 146, 202, 267, 341, 424, 516, 617, 727, 846, 974, 1111, 1257, 1412, 1576, 1749, 1931, 2122, 2322, 2531, 2749, 2976, 3212, 3457, 3711, 3974, 4246, 4527, 4817, 5116, 5424, 5741, 6067, 6402, 6746, 7099, 7461, 7832, 8212, 8601, 8999, 9406
Offset: 0

Views

Author

Paul Barry, Mar 15 2003

Keywords

Examples

			a(1) = 9*1 +  1 + 2 = 12.
a(2) = 9*2 + 12 + 2 = 32.
a(3) = 9*3 + 32 + 2 = 61.
		

Crossrefs

Programs

Formula

a(n) = C(n,0) + 11*C(n,1) + 9*C(n,2); binomial transform of (1, 11, 9, 0, 0, 0, ...).
a(n) = (9*n^2 + 13*n + 2)/2.
G.f.: (1 + 9*x - x^2)/(1-x)^3.
a(n) = 9*n + a(n-1) + 2 (with a(0)=1). - Vincenzo Librandi, Aug 08 2010
From Elmo R. Oliveira, Nov 16 2024: (Start)
E.g.f.: exp(x)*(9*x^2 + 22*x + 2)/2.
a(n) = A064226(n) - 2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A276819 a(n) = (9*n^2 - n)/2 + 1.

Original entry on oeis.org

1, 5, 18, 40, 71, 111, 160, 218, 285, 361, 446, 540, 643, 755, 876, 1006, 1145, 1293, 1450, 1616, 1791, 1975, 2168, 2370, 2581, 2801, 3030, 3268, 3515, 3771, 4036, 4310, 4593, 4885, 5186, 5496, 5815, 6143, 6480, 6826, 7181, 7545, 7918, 8300, 8691, 9091, 9500, 9918, 10345, 10781, 11226, 11680, 12143, 12615
Offset: 0

Views

Author

Yuriy Sibirmovsky, Sep 18 2016

Keywords

Comments

Diagonal of triangular spiral in A051682. The other 5 diagonals are given by A140064, A117625, A081267, A064225, A006137. See the link as well.
First differences are given by A017209.
72*a(n) - 71 is a perfect square. - Klaus Purath, Jan 14 2022

Crossrefs

Programs

  • Mathematica
    Table[(9*n^2-n)/2+1, {n,0,100}]
  • PARI
    Vec((1+2*x+6*x^2)/(1-x)^3 + O(x^60)) \\ Colin Barker, Sep 18 2016
    
  • PARI
    a(n) = (9*n^2 - n)/2 + 1; \\ Altug Alkan, Sep 18 2016

Formula

a(n) = (9*n^2 - n)/2 + 1.
a(n) = a(n-1) + 9*n - 5 with a(0) = 1.
From Colin Barker, Sep 18 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2.
G.f.: (1 + 2*x + 6*x^2)/(1 - x)^3. (End)
From Klaus Purath, Jan 14 2022: (Start)
a(n) = A006137(n) - n.
A003215(a(n)) - A003215(a(n)-3) = A002378(9*n-1). (End)
E.g.f.: exp(x)*(2 + 8*x + 9*x^2)/2. - Stefano Spezia, Dec 25 2022

A239304 Triangle of permutations corresponding to the compressed square roots of Gray code * bit-reversal permutation (A239303).

Original entry on oeis.org

1, 1, 2, 3, 1, 2, 4, 2, 1, 3, 2, 5, 4, 1, 3, 2, 5, 6, 3, 1, 4, 6, 2, 3, 7, 5, 1, 4, 7, 3, 2, 6, 8, 4, 1, 5, 3, 8, 7, 2, 4, 9, 6, 1, 5, 3, 8, 9, 4, 2, 7, 10, 5, 1, 6, 9, 3, 4, 10, 8, 2, 5, 11, 7, 1, 6, 10, 4, 3, 9
Offset: 1

Views

Author

Tilman Piesk, Mar 14 2014

Keywords

Comments

The symmetrical binary matrices corresponding to the rows of A239303 can be interpreted as adjacency matrices of undirected graphs. These graphs are chains where one end is connected to itself, so they can be interpreted as permutations. The end connected to itself is always the first element of the permutation, i.e., on the left side of the triangle.
Columns of the square array:
T(m,1) = A008619(m) = 1,2,2,3,3...
T(m,2) = 1,1,1...
T(m,3) = A028242(m+3) = 3,2,4,3,5,4,6,5,7,6,8,7,9,8,10,9,11,10,12...
T(m,4) = m+3 = 4,5,6...
T(m,5) = A084964(m+4) = 2,5,3,6,4,7,5,8,6,9,7,10,8,11,9,12,10,13...
T(m,6) = 2,2,2...
T(m,7) = A168230(m+5) = 6,3,7,4,8,5,9,6,10,7,11,8,12,9,13,10,14...
T(m,8) = m+6 = 7,8,9...
T(m,9) = A152832(m+9) = 3,8,4,9,5,10,6,11,7,12,8,13,9,14,10,15...
T(m,10) = 3,3,3...
Diagonals of the square array:
T(n,n) = a(A001844(n)) = 1,1,4,7,4,2,9,14,7,3,14,21,10,4,19,28,13,5,24...
T(n,2n-1) = a(A064225(n)) = 1,2,3...
T(2n-1,n) = a(A081267(n)) = 1,1,5,10,6,2,12,21,11,3,19,32,16,4,26,43,21...

Examples

			Triangular array begins:
  1
  1 2
  3 1 2
  4 2 1 3
  2 5 4 1 3
  2 5 6 3 1 4
Square array begins:
  1 1 3 4 2 2
  2 1 2 5 5 2
  2 1 4 6 3 2
  3 1 3 7 6 2
  3 1 5 8 4 2
  4 1 4 9 7 2
Row 5 of A239303 is the vector (12,18,1,17,10), which corresponds to the following binary matrix:
  0 0 1 1 0
  0 1 0 0 1
  1 0 0 0 0
  1 0 0 0 1
  0 1 0 1 0
Interpreted as an adjacency matrix it describes the following graph, where each number is connected to its neighbors, and only the 2 is connected to itself:
  2 5 4 1 3
This is row 5 of the triangular array.
		

Crossrefs

Showing 1-8 of 8 results.