login
Nonsquare positive integers that are sums of consecutive integer squares.
4

%I #15 Jun 08 2020 05:23:04

%S 2,5,6,10,13,14,15,19,28,29,30,31,35,41,44,50,54,55,56,60,61,69,77,85,

%T 86,90,91,92,96,105,110,113,126,135,139,140,141,145,146,149,154,170,

%U 174,181,182,190,194,195,199,203,204,205,209,218,221,230,231

%N Nonsquare positive integers that are sums of consecutive integer squares.

%C Nonsquare terms of A062861.

%C Subsequence of A212016.

%H Robert Israel, <a href="/A212015/b212015.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n)

%p not issqr(n) and

%p ormap(k -> issqr(-3*k^4+3*k^2+36*k*n) and ((3*k-3*k^2+sqrt(-3*k^4+3*k^2+36*k*n))/(6*k))::integer,

%p numtheory:-divisors(6*n))

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Jan 22 2017

%t filterQ[n_] := !IntegerQ[Sqrt[n]] && AnyTrue[Divisors[6n], IntegerQ[Sqrt[-3 #^4 + 3 #^2 + 36 # n]] && IntegerQ[(3 # - 3 #^2 + Sqrt[-3 #^4 + 3 #^2 + 36 # n])/(6#)]&];

%t Select[Range[1000], filterQ] (* _Jean-François Alcover_, Jun 08 2020, after Maple *)

%Y Cf. A062861, A212016.

%K nonn

%O 1,1

%A _Max Alekseyev_, Apr 26 2012