A386516 Least k such that k^2+1 contains exactly n distinct prime factors of the form m^2+1 or 0 if no such k exists.
1, 3, 13, 183, 2843, 41323, 57109753, 1929510527, 760999599793
Offset: 1
Examples
a(4)=183 because the prime factors of 183^2+1 are {2, 5, 17, 197} are of the form m^2+1 with m = 1, 2, 4 and 14.
Programs
-
Maple
with(numtheory):nn:=10^6: for n from 0 to 6 do : ii :=0 : for k from 0 to nn while(ii=0) do : d:=factorset(k^2+1):n0:=nops(d):it:=0: for i from 1 to n0 do: c:=d[i]-1:if sqrt(c) = floor(sqrt(c)) then it:=it+1:else fi: od: if it =n then ii :=1 :printf (`%d %d \n`,n,k): else fi : od: od :
-
Mathematica
a[n_]:=Module[{k=0},Until[PrimeNu[k^2+1]==n&&AllTrue[Sqrt[First/@FactorInteger[k^2+1]-1],IntegerQ],k++];k];Array[a,6] (* James C. McMahon, Jul 25 2025 *)
Extensions
a(7) from Giovanni Resta, Jul 24 2025
a(8)-a(9) from David A. Corneth, Jul 24 2025
Comments