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-7 of 7 results.

A100252 Least square n-gonal number greater than 1, or 0 if none exists.

Original entry on oeis.org

36, 4, 9801, 1225, 81, 225, 9, 0, 196, 64, 36, 441, 3025, 16, 17689, 100, 484, 0, 2601, 729, 68121, 225, 25, 7225, 25921, 81, 1225, 203401, 441, 1089, 4761, 196, 15376, 36, 1936, 511225, 784, 576, 55071241, 47089, 1156, 256, 529046001, 2916, 1134225
Offset: 3

Views

Author

Charlie Marion, Nov 21 2004

Keywords

Comments

Also, let j be the smallest integer for which 1+(1+1*n)+(1+2*n)+... +(1+j*n)=k^2=s. Then a(n)=s; 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.
See A100251 and A188898 for the corresponding indices of these terms. Note that a(n) is zero for n = 10, 20, 52 (numbers in A188896). Although the Mathematica program searches only the first 25000 square numbers for n-gonal numbers, the Reduce function can show that there are no square n-gonal numbers (other than 0 and 1) for these n. - T. D. Noe, Apr 19 2011

Examples

			a(3)=9801 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

Cf. A000290 (squares), A188891 (similar sequence for triangular numbers).

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]; sqr, {n, 3, 64}] (* T. D. Noe, Apr 19 2011 *)

Formula

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

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

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).

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

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

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-7 of 7 results.