OFFSET
1,1
COMMENTS
From Robert Israel, Mar 29 2020: (Start)
All terms are divisible by 4.
Includes all terms of A005574 that are divisible by 4. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
64 is in the sequence because 64^2 + 1 = 17*241 and {17, 241} == 1 (mod 8).
MAPLE
with(numtheory):for n from 1 to 1000 do:x:=factorset(n^2+1):n1:=nops(x):s1:=0:for m from 1 to n1 do: if irem(x[m], 8)=1 then s1:=s1+1:else fi:od:if s1=n1 then printf(`%d, `, n):else fi:od:
# Alternative:
select(n -> numtheory:-factorset(n^2+1) mod 8 = {1}, 4*[$1..1000]); # Robert Israel, Mar 29 2020
MATHEMATICA
Select[Range[576], Union[Mod[Transpose[FactorInteger[#^2 + 1]][[1]], 8]] == {1} &] (* T. D. Noe, Aug 31 2012 *)
Select[Range[600], AllTrue[FactorInteger[#^2+1][[All, 1]], Mod[#, 8]==1&]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 31 2021 *)
PROG
(Magma) [n: n in [1..600] | forall{PrimeDivisors(n^2+1)[i]: i in [1..#PrimeDivisors(n^2+1)] | IsOne(PrimeDivisors(n^2+1)[i] mod 8)}]; // Bruno Berselli, Aug 30 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 30 2012
STATUS
approved