cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062861 Numbers which are sums of squares of consecutive numbers (possibly including squares of negative numbers).

This page as a plain text file.
%I A062861 #15 Feb 27 2019 03:51:05
%S A062861 0,1,2,4,5,6,9,10,13,14,15,16,19,25,28,29,30,31,35,36,41,44,49,50,54,
%T A062861 55,56,60,61,64,69,77,81,85,86,90,91,92,96,100,105,110,113,121,126,
%U A062861 135,139,140,141,144,145,146,149,154,169,170,174,181,182,190,194,195,196
%N A062861 Numbers which are sums of squares of consecutive numbers (possibly including squares of negative numbers).
%H A062861 Robert Israel, <a href="/A062861/b062861.txt">Table of n, a(n) for n = 0..10000</a>
%H A062861 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%e A062861 13, 14, 15 and 16 are in the sequence since 13 = 2^2 + 3^2, 14 = 1^2 + 2^2 + 3^2, 15 = (-1)^2 + 0^2 + 1^2 + 2^2 + 3^2 and 16 = 4^2.
%p A062861 filter:= proc(n)
%p A062861   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 A062861     numtheory:-divisors(6*n))
%p A062861 end proc:
%p A062861 filter(0):= true:
%p A062861 select(filter, [$0..200]); # _Robert Israel_, Jan 22 2017
%t A062861 filterQ[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 A062861 filterQ[0] = True;
%t A062861 Select[Range[0, 200], filterQ] (* _Jean-François Alcover_, Feb 27 2019, after _Robert Israel_ *)
%o A062861 (PARI) { isA062861(t) = fordiv(6*t,k, z=(k^2-1)/3; if(issquare(4*t/k-z), return(k)); if(z>4*t/k,break); ); 0 } \\ _Max Alekseyev_, Apr 26 2012
%Y A062861 Cf. A034705, A062862, A062863.
%K A062861 nonn
%O A062861 0,3
%A A062861 _Henry Bottomley_, Jun 25 2001