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

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

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

A363367 a(n) is the least integer i >= 0 such that (i + 1) * (i + 2*n) / 2 = p^2, p prime number (A000040), or a(n) = -1 if no such i exists.

Original entry on oeis.org

-1, -1, 2, 4, 0, -1, 10, 12, -1, 0, 18, -1, 1, -1, -1, 28, 30, -1, -1, 36, -1, 40, 42, -1, 1, 0, -1, 52, -1, -1, 58, 60, -1, -1, 66, -1, 70, 72, -1, -1, 78, -1, 82, -1, -1, 88, -1, -1, -1, 0, -1, 100, 102, -1, 106, 108, -1, 112, -1, -1, 1, -1, -1, -1, 126, -1, 130
Offset: 0

Views

Author

Ctibor O. Zizka, Jul 05 2023

Keywords

Comments

The shortest arithmetic sequence with initial term n and difference 1 that sums to p^2, p prime number. 2*(n - 1) >= a(n) >= -1.

Examples

			n = 2: 2 + 3 + 4 = 9 = 3^2, a(2) = 2.
n = 3: 3 + 4 + 5 + 6 + 7 = 5^2, a(3) = 4.
n = 4: 4 = 2^2, a(4) = 0.
		

Crossrefs

Formula

a(p^2) = 0, p prime number.
Showing 1-4 of 4 results.