%I #22 Jul 07 2023 05:43:55
%S 2,5,10,13,18,20,26,29,32,34,37,41,45,50,53,58,61,65,68,74,82,85,90,
%T 98,101,104,106,109,113,117,122,125,128,130,137,146,149,153,157,160,
%U 162,164,170,173,178,181,185,194,197,200,202,205,208,212,218,221,226,229,234,242,245,250,257,261
%N Integers k that are the sum of two nonzero squares while k*(k+1) is not.
%C Values of a^2 + b^2 such that (a^2 + b^2)^2 + a^2 + b^2 is not of the form x^2 + y^2 where a, b, x, y are nonzero integers.
%C Terms k of A001481 such that k+1 is not a term of A001481. - _Hugo Pfoertner_, Jul 07 2023
%H Hugo Pfoertner, <a href="/A271787/b271787.txt">Table of n, a(n) for n = 1..10000</a>
%e 5 is a term because 5 = 1^2 + 2^2 and 5^2 + 5 = 30 is not a term of A000404.
%t Select[Range@ 270, Length@ First@ # >= 1 && Last@ # == {} &[PowersRepresentations[#, 2, 2] /. {0, _} -> Nothing & /@ {#, # (# + 1)} &@ #] &] (* _Michael De Vlieger_, Apr 14 2016 *)
%o (PARI) isA000404(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
%o for(n=1, 1e3, if(!isA000404(n*(n+1)) && isA000404(n), print1(n, ", ")));
%Y Cf. A000404, A002378, A001481.
%K nonn,easy
%O 1,1
%A _Altug Alkan_, Apr 14 2016
|