A076114 a(n) = start of the smallest string of n consecutive positive integers with a square sum, or 0 if no such number exists.
1, 4, 2, 0, 3, 11, 4, 1, 5, 18, 6, 0, 7, 25, 8, 0, 9, 4, 10, 0, 11, 39, 12, 2, 4, 46, 14, 0, 15, 53, 16, 9, 17, 60, 18, 0, 19, 67, 20, 3, 21, 74, 22, 0, 23, 81, 24, 0, 1, 16, 26, 0, 27, 11, 28, 4, 29, 102, 30, 0, 31, 109, 32, 0, 33, 116, 34, 0, 35, 123, 36, 5, 37, 130, 11, 0, 39
Offset: 1
Examples
a(2) = 4, 4+5 = 9 = 3^2. a(8) = 1, 1+2+3+4+5+6+7+8 = 36 = 6^2.
Links
- Clement Martin, Table of n, a(n) for n = 1..10000
Programs
-
PARI
a(n,limit=oo) = { my(o=n*(n+1)/2, k=0); while(k
Extensions
More terms from Ralf Stephan, Mar 23 2003
Comments