login
Numbers k such that k, k+1 and k+2 are sums of 2 squares.
5

%I #21 Oct 30 2023 13:24:30

%S 0,8,16,72,80,144,232,288,360,520,576,584,800,808,1088,1096,1152,1224,

%T 1312,1600,1664,1744,1800,1872,1960,2248,2304,2312,2384,2592,2600,

%U 2824,3328,3392,3528,3600,4112,4176,4328,4624,5120,5184,5328,5408,5904,6056

%N Numbers k such that k, k+1 and k+2 are sums of 2 squares.

%C All terms are multiples of 8, cf. A304441. - _M. F. Hasler_, May 13 2018

%H Ivan Neretin, <a href="/A082982/b082982.txt">Table of n, a(n) for n = 1..10000</a>

%H Ajai Choudhry and Bibekananda Maji, <a href="https://arxiv.org/abs/2310.13317">Finite sequences of integers expressible as sums of two squares</a>, arXiv:2310.13317 [math.NT], 2023.

%F a(n) = 8*A304441(n). - _M. F. Hasler_, May 13 2018

%e 80 is here because 80=4^2+8^2, 81=0^2+9^2 and 82=1^2+9^2.

%o (PARI) issumsq(n) = {ok = 0; for (i=0, ceil(sqrt(n/2)), if (issquare(n - i^2), return (1));); return (0);}

%o isok(n) = issumsq(n) && issumsq(n+1) && issumsq(n+2) \\ _Michel Marcus_, Jun 30 2013

%o (PARI) is_A082982(n)={n%8==0&&is_A001481(n\8)&&is_A001481(n\2+1)&&is_A001481(n+1)} \\ using is_A001481 is much faster than the issumsq() above. - _M. F. Hasler_, May 13 2018

%Y Cf. A001481, A050795, A304441.

%K easy,nonn

%O 1,2

%A Xavier Xarles (xarles(AT)mat.uab.es), May 28 2003

%E More terms from _Michel Marcus_, Jun 30 2013