A101160 a(n) is the smallest integer j for which n+(n+1)+...+(n+j) is a square.
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
Keywords
Examples
a(11)=2 since j=2 is the smallest integer for which 11+...+11+j = 6^2 = 36 is a perfect square.
Links
- Shawn A. Broyles, Table of n, a(n) for n = 1..1000
Programs
-
PARI
a(n) = {j = 0; while(! issquare(sum(k=0, j, n+k)), j++); j;} \\ Michel Marcus, Sep 01 2013
Formula
a(n^2) = 0. - Michel Marcus, Jun 28 2013
Extensions
More terms from Michel Marcus, Jun 28 2013
Comments