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 11 results. Next

A100251 The square root of A100252; the index of the least square number greater than 1 that is also an n-gonal number, or 0 if none exists.

Original entry on oeis.org

6, 2, 99, 35, 9, 15, 3, 0, 14, 8, 6, 21, 55, 4, 133, 10, 22, 0, 51, 27, 261, 15, 5, 85, 161, 9, 35, 451, 21, 33, 69, 14, 124, 6, 44, 715, 28, 24, 7421, 217, 34, 16, 23001, 54, 1065, 36, 7, 76, 156, 0, 245
Offset: 3

Views

Author

Charlie Marion, Nov 21 2004

Keywords

Comments

Let j be the smallest integer for which 1 + (1+1*n) + (1+2*n) + ... + (1+j*n) = k^2 = s. Then a(n)=k; if no such j exists, then a(n)=0. Basis for sequence is shortest arithmetic series with initial term 1 and difference n that sums to a perfect square.

Examples

			a(3)=99 since 1 + 4 + 7 + ... + (1+80*3) = 99^2 = 9801 and no other arithmetic series with initial term 1, difference 3 and fewer terms sums to a perfect square.
		

Crossrefs

Programs

  • Mathematica
    NgonIndex[n_, v_] := (-4 + n + Sqrt[16 - 8*n + n^2 - 16*v + 8*n*v])/(n - 2)/2; Table[k = 2; While[sqr = k^2; i = NgonIndex[n, sqr]; k < 25000 && ! IntegerQ[i], k++]; If[k == 25000, k = sqr = i = 0]; k, {n, 3, 64}] (* T. D. Noe, Apr 19 2011 *)

Formula

a(n)^2 = 1 + (1+1*n) + (1+2*n) + ... + (1+A100254(n)*n) = 1 + (1+1*n) +(1+2*n) + ... + A100253(n).
a(n)^2 = A100252(n).

A188896 Numbers n such that there is no square n-gonal number greater than 1.

Original entry on oeis.org

10, 20, 52, 164, 340, 580, 884, 1252, 1684, 2180, 2740, 4052, 4804, 5620, 6500, 7444, 8452, 9524, 10660, 11860, 13124, 14452, 15844, 17300, 18820, 20404, 22052, 25540, 27380, 29284, 31252, 33284, 35380, 37540, 39764, 42052, 44404, 46820, 49300, 51844
Offset: 1

Views

Author

T. D. Noe, Apr 13 2011

Keywords

Comments

It is easy to find squares that are triangular, pentagonal, hexagonal, etc. So it is somewhat surprising that there are no square 10-gonal numbers other than 0 and 1. For these n, the equation 2*x^2 = (n-2)*y^2 - (n-4)*y has no integer solutions x>1 and y>1.
Chu shows how to transform the equation into a generalized Pell equation. When n has the form 2k^2+2 (A005893), then the Pell equation has only a finite number of solutions and it is simple to select the n that produce no integer solutions greater than 1.
The general case is in A188950.

Crossrefs

Cf. A001107 (10-gonal numbers), A051872 (20-gonal numbers), A188892, A100252, A188950, A005893.
Subsequence of A271624. - Muniru A Asiru, Oct 16 2016

Programs

  • Mathematica
    P[n_,k_]:=1/2n(n(k-2)+4-k); data1=2#^2+2&/@Range[2,161]; data2=Head[Reduce[m^2==P[n,#] && 1Ant King, Mar 01 2012 *)

A101157 Let j be the smallest integer for which n+(n+1)+...+(n+j) is a square, say k^2; then a(n)=k.

Original entry on oeis.org

1, 3, 5, 2, 9, 11, 13, 15, 3, 19, 6, 5, 25, 27, 29, 4, 33, 10, 37, 39, 14, 43, 45, 7, 5, 9, 53, 55, 57, 59, 61, 18, 65, 67, 15, 6, 18, 75, 22, 9, 81, 83, 15, 87, 21, 26, 12, 95, 7, 99, 101, 33, 30, 107, 109, 111, 22, 25, 117, 11, 121, 42, 125, 8, 129
Offset: 1

Views

Author

Charlie Marion, Dec 29 2004

Keywords

Comments

Basis for sequence is shortest arithmetic sequence with initial term n and difference 1 that sums to a perfect square. Cf. A100251, A100252, A100253, A100254.
a(n) is the least k>0 such that triangular(n-1) + k^2 is a triangular number. - Alex Ratushnyak, May 17 2013

Examples

			a(11)=6 since 11+12+13 = 6^2.
		

Crossrefs

Programs

  • PARI
    a(n) = {j = 0; while(! issquare(v=sum(k=0, j, n+k)), j++); sqrtint(v);} \\ Michel Marcus, Sep 01 2013

Formula

n+(n+1)+...+(n+A101160(n)) = n+(n+1)+...+A101159(n) = a(n)^2 = A101158(n).
a(n^2) = n. - Michel Marcus, Jun 28 2013

Extensions

More terms from Michel Marcus, Jun 28 2013

A100253 Let j be the smallest integer for which 1+(1+1*n)+(1+2*n)+...+(1+j*n)=k^2=s. Then a(n)=1+j*n; if no such j exists, then a(n)=0.

Original entry on oeis.org

8, 3, 241, 97, 26, 49, 8, 0, 55, 31, 23, 97, 274, 15, 721, 49, 120, 0, 305, 161, 1681, 89, 24, 577, 1126, 53, 244, 3361, 146, 241, 528, 97, 991, 35, 351, 6049, 223, 191, 65521, 1921, 288, 127, 213281, 485, 10081, 323, 48, 721, 1520, 0, 2449
Offset: 1

Views

Author

Charlie Marion, Nov 21 2004

Keywords

Comments

Basis for sequence is shortest arithmetic series with initial term 1 and difference n that sums to a perfect square.

Examples

			a(3)=241 since 1 + 4 + 7 +...+ 241 = 99^2 = 9801 and no other arithmetic series with initial term 1, difference 3 and fewer terms sums to a perfect square.
		

Formula

1+(1+1*n)+(1+2*n)+...+(1+A100254(n)*n)= 1+(1+1*n)+(1+2*n)+...+a(n)=A100251(n)^2=A100252(n)

A100254 Let j be the smallest integer for which 1 + (1+1*n) + (1+2*n) + ... + (1+j*n) = k^2 = s. Then a(n)=j; if no such j exists, then a(n)=0.

Original entry on oeis.org

7, 1, 80, 24, 5, 8, 1, 0, 6, 3, 2, 8, 21, 1, 48, 3, 7, 0, 16, 8, 80, 4, 1, 24, 45, 2, 9, 120, 5, 8, 17, 3, 30, 1, 10, 168, 6, 5, 1680, 48, 7, 3, 4960, 11, 224, 7, 1, 15, 31, 0, 48, 24, 16, 12, 288, 8, 48, 6, 26, 80, 117, 1, 136160, 195, 13, 3, 9, 840, 1520, 24, 49, 8, 70, 2, 1680
Offset: 1

Views

Author

Charlie Marion, Nov 21 2004

Keywords

Comments

Basis for sequence is shortest arithmetic series with initial term 1 and difference n that sums to a perfect square.

Examples

			a(3)=80 since 1 + 4 + 7 +...+ (1+80*3) = 99^2 = 9801 and no other arithmetic series with initial term 1, difference 3 and fewer terms sums to a perfect square.
		

Programs

  • Mathematica
    a[n_] := Block[{k = 1}, While[ !IntegerQ[ Sqrt[(k + 1)(1 + k*n/2)]], k++ ]; k]; a[18] = a[50] = 0; Table[ a[n], {n, 75}] (* Robert G. Wilson v, Nov 27 2004 *)

Formula

1 + (1+1*n) + (1+2*n) + ... + (1+a(n)*n) = 1 + (1+1*n) + (1+2*n) + ... + A100253(n) = A100251(n)^2 = A100252(n).

Extensions

More terms from Robert G. Wilson v, Nov 27 2004

A189216 Triangle T(n,k) read by rows of the smallest n-gonal number greater than 1 that is also k-gonal, or 0 if none exists, for 3 <= k <= n.

Original entry on oeis.org

3, 36, 4, 210, 9801, 5, 6, 1225, 40755, 6, 55, 81, 4347, 121771, 7, 21, 225, 176, 11781, 297045, 8, 325, 9, 651, 325, 26884, 631125, 9, 10, 0, 12376, 1540, 540, 54405, 1212751, 10, 0, 196, 715, 0, 3186, 833, 100725, 2158695, 11, 105, 64, 12, 561, 18361, 5985, 1216, 174097, 3617601, 12
Offset: 3

Views

Author

T. D. Noe, Apr 18 2011

Keywords

Comments

The first column (k=3, triangular numbers) is A188891. The second column (k=4, squares) is A100252. The n-th term of the n-th row is n. Observe that 0 occurs for (10,4)-gonal, (11,3)-gonal, and (11,6)-gonal numbers. This can be proved by trying to solve the equation (k-2)*x^2 - (k-4)*x = (n-2)*y^2 - (n-4)*y for integers x>1 and y>1. Other pairs that are zero: (14,5), (18,3), (18,6), (18,11), (20,4), and (20,10). See A188950 for a longer list of pairs.
Sequences A189217 and A189218 give the index of T(n,k) as a k-gonal and n-gonal number, respectively.

Examples

			The triangle begins:
3
36,      4
210,     9801,    5
6,       1225,    40755,   6
55,      81,      4347,    121771,  7
21,      225,     176,     11781,   297045,  8
325,     9,       651,     325,     26884,   631125,  9
10,      0,       12376,   1540,    540,     54405,   1212751, 10
0,       196,     715,     0,       3186,    833,     100725,  2158695,  11
		

Crossrefs

Programs

  • Mathematica
    nn = 12; Clear[poly]; Do[poly[n] = Table[i*((n - 2)*i - (n - 4))/2, {i, 2, 20000}], {n, 3, nn}]; Flatten[Table[If[k == n, n, int = Intersection[poly[n], poly[k]]; If[int == {}, 0, int[[1]]]], {n, 3, nn}, {k, 3, n}]]

A101160 a(n) is the smallest integer j for which n+(n+1)+...+(n+j) is a square.

Original entry on oeis.org

0, 2, 4, 0, 8, 10, 12, 14, 0, 18, 2, 1, 24, 26, 28, 0, 32, 4, 36, 38, 7, 42, 44, 1, 0, 2, 52, 54, 56, 58, 60, 8, 64, 66, 5, 0, 7, 74, 10, 1, 80, 82, 4, 86, 8, 12, 2, 94, 0, 98, 100, 17, 14, 106, 108, 110, 7, 9, 116, 1, 120, 23, 124, 0, 128
Offset: 1

Views

Author

Charlie Marion, Dec 29 2004

Keywords

Comments

Basis for sequence is shortest arithmetic sequence with initial term n and difference 1 that sums to a perfect square. Cf. A100251, A100252, A100253, A100254.
0 <= a(n) <= 2*(n - 1). - Ctibor O. Zizka, Oct 05 2023

Examples

			a(11)=2 since j=2 is the smallest integer for which 11+...+11+j = 6^2 = 36 is a perfect square.
		

Crossrefs

Programs

  • PARI
    a(n) = {j = 0; while(! issquare(sum(k=0, j, n+k)), j++); j;} \\ Michel Marcus, Sep 01 2013

Formula

n+(n+1)+...+(n+a(n)) = n+(n+1)+...+A101159(n) = A101157(n)^2 = A101158(n).
a(n^2) = 0. - Michel Marcus, Jun 28 2013

Extensions

More terms from Michel Marcus, Jun 28 2013

A188891 Least triangular n-gonal number greater than 1, or 0 if none exists.

Original entry on oeis.org

3, 36, 210, 6, 55, 21, 325, 10, 0, 105, 36, 1275, 15, 45, 231, 0, 946, 276, 21, 11935, 66, 136, 351, 1596, 78, 28, 1225, 595, 820, 58653, 190, 325, 1335795, 36, 6670, 0, 561, 4005, 120, 1128, 1485, 203841, 45, 666, 6903, 465, 4950, 20910, 741, 153, 10731, 8911, 55, 1953
Offset: 3

Views

Author

T. D. Noe, Apr 13 2011

Keywords

Comments

See A188893 and A188894 for the corresponding indices of these terms. Note that a(n) is zero for n = 11, 18, 38 (numbers in A188892). Although the Mathematica program searches only the first 20000 triangular numbers for n-gonal numbers, the Reduce function can show that there are no triangular n-gonal numbers (other than 0 and 1) for these n.

Crossrefs

Cf. A000217 (triangular numbers), A100252 (similar sequence for squares).

Programs

  • Mathematica
    NgonIndex[n_, v_] := (-4 + n + Sqrt[16 - 8*n + n^2 - 16*v + 8*n*v])/(n - 2)/2; Table[k = 2; While[tr = k*(k+1)/2; i = NgonIndex[n, tr]; k < 20000 && ! IntegerQ[i], k++]; If[k==20000, tr=0]; tr, {n, 3, 50}]
    Table[SelectFirst[PolygonalNumber[n,Range[2,1000]],OddQ[Sqrt[8#+1]]&],{n,3,100}]/.Missing["NotFound"]->0 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 10 2019 *)

A101158 Let j be the smallest integer for which n+(n+1)+...+(n+j) is a square; sequence gives the squares.

Original entry on oeis.org

1, 9, 25, 4, 81, 121, 169, 225, 9, 361, 36, 25, 625, 729, 841, 16, 1089, 100, 1369, 1521, 196, 1849, 2025, 49, 25, 81, 2809, 3025, 3249, 3481, 3721, 324, 4225, 4489, 225, 36, 324, 5625, 484, 81, 6561, 6889, 225, 7569, 441, 676, 144, 9025, 49, 9801
Offset: 1

Views

Author

Charlie Marion, Dec 29 2004

Keywords

Comments

Basis for sequence is shortest arithmetic sequence with initial term n and difference 1 that sums to a perfect square. Cf. A100251, A100252, A100253, A100254.

Examples

			a(11)=36 since 11+12+13 = 36.
		

Crossrefs

Formula

n+(n+1)+...+(n+A101160(n)) = n+(n+1)+...+A101159(n) = A101157(n)^2 = a(n).
a(n^2) = n^2. - Michel Marcus, Jun 28 2013

Extensions

a(21) corrected by Michel Marcus, Jun 29 2013

A101159 Let j be the smallest integer for which n+(n+1)+...+(n+j) is a square; then a(n) = n+j.

Original entry on oeis.org

1, 4, 7, 4, 13, 16, 19, 22, 9, 28, 13, 13, 37, 40, 43, 16, 49, 22, 55, 58, 28, 64, 67, 25, 25, 28, 79, 82, 85, 88, 91, 40, 97, 100, 40, 36, 44, 112, 49, 41, 121, 124, 47, 130, 53, 58, 49, 142, 49, 148, 151, 69, 67, 160, 163, 166, 64, 67, 175, 61
Offset: 1

Views

Author

Charlie Marion, Dec 29 2004

Keywords

Comments

Basis for sequence is shortest arithmetic sequence with initial term n and difference 1 that sums to a perfect square. Cf. A100251, A100252, A100253, A100254.

Examples

			a(11)=13 since j=13 is the smallest integer such that 11+...+j=6^2=36 is a perfect square.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(j = 0); while(! issquare(sum(k=0, j, n+k)), j++); n+j;} \\ Michel Marcus, May 02 2018
    
  • PARI
    a(n) = my(s = n, t = 0); while(!issquare(s), s += n + t++); n + t \\ David A. Corneth, May 05 2018

Formula

n+(n+1)+...+(n+A101160(n)) = n+(n+1)+...+a(n) = A101157(n)^2 = A101158(n).
a(n^2) = n^2. - Michel Marcus, Jun 28 2013
a(n) <= 3*n - 2. - David A. Corneth, May 03 2018

Extensions

More terms from Michel Marcus, Jun 28 2013
Showing 1-10 of 11 results. Next