Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Sep 27 2018 19:57:45
%S 21,30,32,47,72,191,268,274,313,327,401,469,500,526,606,775,785,788,
%T 820,889,891,919,948,1046,1250,1382,1428,1441,1560,1636,1696,1714,
%U 1772,1806,1834,2018,2041,2348,2584,2610,2641,2782,3144,3357,3359,3488,3740,3769
%N Numbers n such that the absolute value of the difference between the sum of the distinct prime factors of n^2 + 1 that are congruent to 1 mod 8 and the sum of the distinct prime factors of n^2 + 1 that are congruent to 5 mod 8 is a square. There must be at least one prime factor of each type.
%C The corresponding squares are : 4, 36, 36, 1, 49, 49, 1, 196, 9, 25, 49, 900, 36, 484, 25, 1764, 49, 256, 1089, 169, 1156, 25, 0, 5476, 100, 81, 49, 529, 0, 16, ... and the values n for which this sequence equals 0 are in A215950.
%H Robert Israel, <a href="/A215965/b215965.txt">Table of n, a(n) for n = 1..10000</a>
%e 2018 is in the sequence because 2018^2 + 1 = 4072325 = 5^2*29*41*137 and (137+41) - (5+29) = 144 is a square, where {41, 137} == 1 mod 8 and {5, 29} ==5 mod 8.
%p with(numtheory):for n from 1 to 1000 do:x:=factorset(n^2+1):n1:=nops(x):s1:=0:s3:=0:for m from 1 to n1 do: if irem(x[m],8)=1 then s1:=s1+x[m]:else if irem(x[m],8)=5 then s3:=s3+x[m]:else fi:fi:od:x:=abs(s1-s3):y:=sqrt(x):if s1>0 and s3>0 and y=floor(y) then printf(`%d, `,n):else fi:od:
%Y Cf. A002522, A215950, A215963.
%K nonn
%O 1,1
%A _Michel Lagneau_, Aug 29 2012
%E Definition clarified by _Robert Israel_, Sep 27 2018