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.

A001107 10-gonal (or decagonal) numbers: a(n) = n*(4*n-3).

Original entry on oeis.org

0, 1, 10, 27, 52, 85, 126, 175, 232, 297, 370, 451, 540, 637, 742, 855, 976, 1105, 1242, 1387, 1540, 1701, 1870, 2047, 2232, 2425, 2626, 2835, 3052, 3277, 3510, 3751, 4000, 4257, 4522, 4795, 5076, 5365, 5662, 5967, 6280, 6601, 6930, 7267, 7612, 7965, 8326
Offset: 0

Views

Author

Keywords

Comments

Write 0, 1, 2, ... in a square spiral, with 0 at the origin and 1 immediately below it; sequence gives numbers on the negative y-axis (see Example section).
Number of divisors of 48^(n-1) for n > 0. - J. Lowell, Aug 30 2008
a(n) is the Wiener index of the graph obtained by connecting two copies of the complete graph K_n by an edge (for n = 3, approximately: |>-<|). The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph. - Emeric Deutsch, Sep 20 2010
This sequence does not contain any squares other than 0 and 1. See A188896. - T. D. Noe, Apr 13 2011
For n > 0: right edge of the triangle A033293. - Reinhard Zumkeller, Jan 18 2012
Sequence found by reading the line from 0, in the direction 0, 10, ... and the parallel line from 1, in the direction 1, 27, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Jul 18 2012
Partial sums give A007585. - Omar E. Pol, Jan 15 2013
This is also a star pentagonal number: a(n) = A000326(n) + 5*A000217(n-1). - Luciano Ancora, Mar 28 2015
Also the number of undirected paths in the n-sunlet graph. - Eric W. Weisstein, Sep 07 2017
After 0, a(n) is the sum of 2*n consecutive integers starting from n-1. - Bruno Berselli, Jan 16 2018
Number of corona of an H0 hexagon with a T(n) triangle. - Craig Knecht, Dec 13 2024

Examples

			On a square lattice, place the nonnegative integers at lattice points forming a spiral as follows: place "0" at the origin; then move one step downward (i.e., in the negative y direction) and place "1" at the lattice point reached; then turn 90 degrees in either direction and place a "2" at the next lattice point; then make another 90-degree turn in the same direction and place a "3" at the lattice point; etc. The terms of the sequence will lie along the negative y-axis, as seen in the example below:
  99  64--65--66--67--68--69--70--71--72
   |   |                               |
  98  63  36--37--38--39--40--41--42  73
   |   |   |                       |   |
  97  62  35  16--17--18--19--20  43  74
   |   |   |   |               |   |   |
  96  61  34  15   4---5---6  21  44  75
   |   |   |   |   |       |   |   |   |
  95  60  33  14   3  *0*  7  22  45  76
   |   |   |   |   |   |   |   |   |   |
  94  59  32  13   2--*1*  8  23  46  77
   |   |   |   |           |   |   |   |
  93  58  31  12--11-*10*--9  24  47  78
   |   |   |                   |   |   |
  92  57  30--29--28-*27*-26--25  48  79
   |   |                           |   |
  91  56--55--54--53-*52*-51--50--49  80
   |                                   |
  90--89--88--87--86-*85*-84--83--82--81
[Edited by _Jon E. Schoenfield_, Jan 02 2017]
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
  • Bruce C. Berndt, Ramanujan's Notebooks, Part II, Springer; see p. 23.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
  • S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A093565 ((8, 1) Pascal, column m = 2). Partial sums of A017077.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. A003215.

Programs

  • Magma
    [4*n^2-3*n : n in [0..50] ]; // Wesley Ivan Hurt, Jun 05 2014
    
  • Maple
    A001107:=-(1+7*z)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {0, 1, 10}, 60] (* Harvey P. Dale, May 08 2012 *)
    Table[PolygonalNumber[RegularPolygon[10], n], {n, 0, 46}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
    Table[4 n^2 - 3 n, {n, 0, 49}] (* Alonso del Arte, Jan 24 2017 *)
    PolygonalNumber[10, Range[0, 20]] (* Eric W. Weisstein, Sep 07 2017 *)
    LinearRecurrence[{3, -3, 1}, {1, 10, 27}, {0, 20}] (* Eric W. Weisstein, Sep 07 2017 *)
  • PARI
    a(n)=4*n^2-3*n
    
  • Python
    a=lambda n: 4*n**2-3*n # Indranil Ghosh, Jan 01 2017
    def aList(): # Intended to compute the initial segment of the sequence, not isolated terms.
         x, y = 1, 1
         yield 0
         while True:
             yield x
             x, y = x + y + 8, y + 8
    A001107 = aList()
    print([next(A001107) for i in range(49)]) # Peter Luschny, Aug 04 2019

Formula

a(n) = A033954(-n) = A074377(2*n-1).
a(n) = n + 8*A000217(n-1). - Floor van Lamoen, Oct 14 2005
G.f.: x*(1 + 7*x)/(1 - x)^3.
Partial sums of odd numbers 1 mod 8, i.e., 1, 1 + 9, 1 + 9 + 17, ... . - Jon Perry, Dec 18 2004
1^3 + 3^3*(n-1)/(n+1) + 5^3*((n-1)*(n-2))/((n+1)*(n+2)) + 7^3*((n-1)*(n-2)*(n-3))/((n+1)*(n+2)*(n+3)) + ... = n*(4*n-3) [Ramanujan]. - Neven Juric, Apr 15 2008
Starting (1, 10, 27, 52, ...), this is the binomial transform of [1, 9, 8, 0, 0, 0, ...]. - Gary W. Adamson, Apr 30 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2, a(0)=0, a(1)=1, a(2)=10. - Jaume Oliver Lafont, Dec 02 2008
a(n) = 8*n + a(n-1) - 7 for n>0, a(0)=0. - Vincenzo Librandi, Jul 10 2010
a(n) = 8 + 2*a(n-1) - a(n-2). - Ant King, Sep 04 2011
a(n) = A118729(8*n). - Philippe Deléham, Mar 26 2013
a(8*a(n) + 29*n+1) = a(8*a(n) + 29*n) + a(8*n + 1). - Vladimir Shevelev, Jan 24 2014
Sum_{n >= 1} 1/a(n) = Pi/6 + log(2) = 1.216745956158244182494339352... = A244647. - Vaclav Kotesovec, Apr 27 2016
From Ilya Gutkovskiy, Aug 28 2016: (Start)
E.g.f.: x*(1 + 4*x)*exp(x).
Sum_{n >= 1} (-1)^(n+1)/a(n) = (sqrt(2)*Pi - 2*log(2) + 2*sqrt(2)*log(1 + sqrt(2)))/6 = 0.92491492293323294695... (End)
a(n) = A000217(3*n-2) - A000217(n-2). In general, if P(k,n) be the n-th k-gonal number and T(n) be the n-th triangular number, A000217(n), then P(T(k),n) = T((k-1)*n - (k-2)) - T(k-3)*T(n-2). - Charlie Marion, Sep 01 2020
Product_{n>=2} (1 - 1/a(n)) = 4/5. - Amiram Eldar, Jan 21 2021
a(n) = A003215(n-1) + A000290(n) - 1. - Leo Tavares, Jul 23 2022

A054552 a(n) = 4*n^2 - 3*n + 1.

Original entry on oeis.org

1, 2, 11, 28, 53, 86, 127, 176, 233, 298, 371, 452, 541, 638, 743, 856, 977, 1106, 1243, 1388, 1541, 1702, 1871, 2048, 2233, 2426, 2627, 2836, 3053, 3278, 3511, 3752, 4001, 4258, 4523, 4796, 5077, 5366, 5663, 5968, 6281, 6602, 6931, 7268, 7613, 7966, 8327
Offset: 0

Views

Author

Enoch Haga and G. L. Honaker, Jr., Apr 09 2000

Keywords

Comments

Also indices in any square spiral organized like A054551.
Equals binomial transform of [1, 1, 8, 0, 0, 0, ...]. - Gary W. Adamson, May 11 2008
Ulam's spiral (E spoke). - Robert G. Wilson v, Oct 31 2011
For n > 0: left edge of the triangle A033293. - Reinhard Zumkeller, Jan 18 2012

Examples

			The spiral begins:
.
197-196-195-194-193-192-191-190-189-188-187-186-185-184-183
  |                                                       |
198 145-144-143-142-141-140-139-138-137-136-135-134-133 182
  |   |                                               |   |
199 146 101-100--99--98--97--96--95--94--93--92--91 132 181
  |   |   |                                       |   |   |
200 147 102  65--64--63--62--61--60--59--58--57  90 131 180
  |   |   |   |                               |   |   |   |
201 148 103  66  37--36--35--34--33--32--31  56  89 130 179
  |   |   |   |   |                       |   |   |   |   |
202 149 104  67  38  17--16--15--14--13  30  55  88 129 178
  |   |   |   |   |   |               |   |   |   |   |   |
203 150 105  68  39  18   5---4---3  12  29  54  87 128 177
  |   |   |   |   |   |   |       |   |   |   |   |   |   |
204 151 106  69  40  19   6   1---2  11  28  53  86 127 176
  |   |   |   |   |   |   |           |   |   |   |   |   |
205 152 107  70  41  20   7---8---9--10  27  52  85 126 175
  |   |   |   |   |   |                   |   |   |   |   |
206 153 108  71  42  21--22--23--24--25--26  51  84 125 174
  |   |   |   |   |                           |   |   |   |
207 154 109  72  43--44--45--46--47--48--49--50  83 124 173
  |   |   |   |                                   |   |   |
208 155 110  73--74--75--76--77--78--79--80--81--82 123 172
  |   |   |                                           |   |
209 156 111-112-113-114-115-116-117-118-119-120-121-122 171
  |   |                                                   |
210 157-158-159-160-161-162-163-164-165-166-167-168-169-170
  |
211-212-213-214-215-216-217-218-219-220-221-222-223-224-225
.
- _Robert G. Wilson v_, Jul 04 2014
		

Crossrefs

Spokes of square spiral: A054552, A054554, A054556, A053755, A054567, A054569, A033951, A016754.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. A003215.

Programs

Formula

G.f.: (1 - x + 8*x^2)/(1-x)^3.
a(n) = 8*n + a(n-1) - 7 (with a(0)=1). - Vincenzo Librandi, Aug 07 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=2, a(2)=11. - Harvey P. Dale, Oct 10 2011
E.g.f.: exp(x)*(1 + x + 4*x^2). - Stefano Spezia, May 14 2021
a(n) = A003215(n-1) + A000290(n). - Leo Tavares, Jul 21 2022

A033291 A Connell-like sequence: take the first multiple of 1, the next 2 multiples of 2, the next 3 multiples of 3, etc.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 28, 30, 35, 40, 45, 50, 54, 60, 66, 72, 78, 84, 91, 98, 105, 112, 119, 126, 133, 136, 144, 152, 160, 168, 176, 184, 192, 198, 207, 216, 225, 234, 243, 252, 261, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 374, 385, 396, 407, 418, 429, 440, 451, 462
Offset: 1

Views

Author

Keywords

Comments

Row sums are 0, 1, 6, 27, 88, 200, ... with g.f. -x*(1 + 4*x + 16*x^2 + 37*x^3 + 39*x^4 + 54*x^5 + 39*x^6 + 17*x^7 + 8*x^8 + x^9) / ( (1 + x + x^2)^3*(x-1)^5 ). - R. J. Mathar, Aug 10 2017

Examples

			Triangle begins
   1;
   2,  4;
   6,  9,  12;
  16, 20,  24,  28;
  30, 35,  40,  45,  50;
  54, 60,  66,  72,  78,  84;
  91, 98, 105, 112, 119, 126, 133; ...
		

Crossrefs

Cf. A192735 (left edge), A192736 (right edge).

Programs

  • Haskell
    a033291 n k = a033291_tabl !! (n-1) !! (k-1)
    a033291_row n = a033291_tabl !! (n-1)
    a033291_tabl = f 1 [1..] where
       f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where
         ys  = take k $ filter ((== 0) . (`mod` k)) xs
    a192735 n = head $ a033291_tabl !! (n-1)
    a192736 n = last $ a033291_tabl !! (n-1)
    -- Reinhard Zumkeller, Jan 18 2012, Jul 08 2011
    
  • Maple
    A033291 := proc(n,k)
        A192735(n)+(k-1)*n ;
    end proc:
    seq(seq(A033291(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Aug 10 2017
  • Mathematica
    Flatten[ Table[ n*(Floor[ (n-1)^2/3] + k), {n, 1, 12}, {k, 1, n}]] (* Jean-François Alcover, Sep 30 2011 *)
  • PARI
    a(n)=my(q=(sqrtint(8*n-7)+1)\2); q*n-q*(q+1)\6*q \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) = q(n)*n - q(n)*floor(q(n)*(q(n)+1)/6) with q(n) = ceiling((1/2)*(-1 + sqrt(1+8*(n)))).

Extensions

Corrected and formula added by Johannes W. Meijer, Oct 07 2010

A204674 a(n) = 4*n^3 + 5*n^2 + 2*n + 1.

Original entry on oeis.org

1, 12, 57, 160, 345, 636, 1057, 1632, 2385, 3340, 4521, 5952, 7657, 9660, 11985, 14656, 17697, 21132, 24985, 29280, 34041, 39292, 45057, 51360, 58225, 65676, 73737, 82432, 91785, 101820, 112561, 124032, 136257, 149260, 163065, 177696, 193177, 209532, 226785, 244960, 264081
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 18 2012

Keywords

Crossrefs

Row sums of A033293.

Programs

  • Haskell
    a204674 n = n * (n * (4 * n + 5) + 2) + 1
    
  • Mathematica
    LinearRecurrence[{4,-6,4,-1},{1,12,57,160},50] (* or *) CoefficientList[ Series[(1+3x)(1+5x)/(1-x)^4,{x,0,50}],x] (* Harvey P. Dale, Jun 25 2021 *)
  • PARI
    a(n)={ 4*n^3 + 5*n^2 + 2*n + 1 } \\ Andrew Howroyd, Jan 07 2020

Formula

a(n) = (4*n^2 + n + 1)*(n + 1).
G.f.: (1 + 3*x)*(1 + 5*x)/(1 - x)^4. - Andrew Howroyd, Jan 07 2020
E.g.f.: exp(x)*(1 + 11*x + 17*x^2 + 4*x^3). - Elmo R. Oliveira, Aug 08 2025

Extensions

Terms a(26) and beyond from Andrew Howroyd, Jan 07 2020

A204675 a(n) = 16*n^2 + 2*n + 1.

Original entry on oeis.org

1, 19, 69, 151, 265, 411, 589, 799, 1041, 1315, 1621, 1959, 2329, 2731, 3165, 3631, 4129, 4659, 5221, 5815, 6441, 7099, 7789, 8511, 9265, 10051, 10869, 11719, 12601, 13515, 14461, 15439, 16449, 17491, 18565, 19671, 20809, 21979, 23181, 24415, 25681, 26979
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 18 2012

Keywords

Comments

Central terms of the triangle A033293.
Also sequence found by reading the line from 1, in the direction 1, 19, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Programs

  • Haskell
    a204675 n = 2 * n * (8 * n + 1) + 1
    
  • Magma
    I:=[1, 19, 69]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Mar 19 2012
    
  • Mathematica
    CoefficientList[Series[(1+x)*(1+15*x)/(1-x)^3,{x,0,50}],x] (* or *) LinearRecurrence[{3, -3, 1}, {1, 19, 69}, 50] (* Vincenzo Librandi, Mar 19 2012 *)
  • PARI
    a(n)=16*n^2+2*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: (1+x)*(1+15*x)/(1-x)^3. - Bruno Berselli, Jan 18 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Jun 09 2023
E.g.f.: exp(x)*(1 + 2*x*(9 + 8*x)). - Elmo R. Oliveira, Oct 18 2024
Showing 1-5 of 5 results.