login
Numbers k such that every prime factor of k^2 + 1 is congruent to 5 (mod 8).
2

%I #17 Jan 23 2022 20:04:16

%S 2,6,8,10,12,14,18,26,28,44,48,52,54,60,66,68,70,74,76,80,82,88,90,92,

%T 94,96,104,108,110,118,122,126,130,134,136,138,142,146,150,152,162,

%U 164,170,182,188,206,210,218,220,230,244,248,250,270,272,282,292,294

%N Numbers k such that every prime factor of k^2 + 1 is congruent to 5 (mod 8).

%C From _Robert Israel_, Mar 29 2020: (Start)

%C All terms are even.

%C Contains all terms of A005574 that are even but not divisible by 4. (End)

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

%e 28 is in the sequence because 28^2 + 1 = 5*157 and {5,157} == 5 (mod 8).

%p with(numtheory):for n from 1 to 300 do:x:=factorset(n^2+1):n1:=nops(x):s1:=0:for m from 1 to n1 do: if irem(x[m],8)=5 then s1:=s1+1:else fi:od:if s1=n1 then printf(`%d, `,n):else fi:od:

%t Select[Range[294], Union[Mod[Transpose[FactorInteger[#^2 + 1]][[1]], 8]] == {5} &] (* _T. D. Noe_, Aug 31 2012 *)

%o (Magma) [n: n in [1..300] | forall{PrimeDivisors(n^2+1)[i]: i in [1..#PrimeDivisors(n^2+1)] | PrimeDivisors(n^2+1)[i] mod 8 eq 5}]; // _Bruno Berselli_, Aug 30 2012

%Y Cf. A002522, A215950, A215963, A215965.

%K nonn

%O 1,1

%A _Michel Lagneau_, Aug 30 2012