OFFSET
1,2
LINKS
Nicolay Avilov, Problem 1876. Segment of a natural series (in Russian).
EXAMPLE
The number 3 is a member of the sequence because the sum of all natural numbers from 3^2 to 4^2 inclusive is 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 = 100, with 100 = 10^2.
PROG
(PARI) check(k, mm=100) = my(d=2*k^2-1, v=List([]), x, y, z); for(t=d+1, 17*d, if(issquare((t^2-d^2)/2), listput(v, t))); if(v[#v\2] != 3*d, return(-1)); for(i=1, #v\2, x=v[i]; y=v[i+#v\2]; for(j=1, mm, if(issquare((x-1)/2) && x>d+2, return(1)); z=6*y-x; x=y; y=z)); 0; \\ Jinyuan Wang, Jul 06 2024; just for checking
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Nicolay Avilov, May 07 2024
STATUS
approved