A174069 Numbers that can be written as a sum of at least 2 squares of consecutive positive integers.
5, 13, 14, 25, 29, 30, 41, 50, 54, 55, 61, 77, 85, 86, 90, 91, 110, 113, 126, 135, 139, 140, 145, 149, 174, 181, 190, 194, 199, 203, 204, 221, 230, 245, 255, 265, 271, 280, 284, 285, 294, 302, 313, 330, 355, 365, 366, 371, 380, 384, 385, 415, 421, 434, 446, 451
Offset: 1
Examples
5 = 1^2 + 2^2 13 = 2^2 + 3^2 14 = 1^2 + 2^2 + 3^2 25 = 3^2 + 4^2
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
max = 50^2; lst = {}; Do[z = n^2; Do[z += (n + x)^2; If[z > max, Break[]]; AppendTo[lst, z], {x, max/2}], {n, max/2}]; Union[lst]
-
PARI
N=20;a=[];for(i=2,N, for(k=1,i-1,if(N^2*2>t=sum(j=i-k,i,j^2),a=setunion(a,Set(t)),break)));a \\ M. F. Hasler, Dec 22 2013
Extensions
Name edited by Altug Alkan, Dec 24 2015
Comments