login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101159 Let j be the smallest integer for which n+(n+1)+...+(n+j) is a square; then a(n) = n+j. 4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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.
LINKS
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
EXAMPLE
a(11)=13 since j=13 is the smallest integer such that 11+...+j=6^2=36 is a perfect square.
PROG
(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
CROSSREFS
Sequence in context: A329740 A110669 A106027 * A339948 A270136 A269756
KEYWORD
nonn
AUTHOR
Charlie Marion, Dec 29 2004
EXTENSIONS
More terms from Michel Marcus, Jun 28 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)