This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A386516 #25 Jul 25 2025 14:23:45 %S A386516 1,3,13,183,2843,41323,57109753,1929510527,760999599793 %N 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. %e A386516 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. %p A386516 with(numtheory):nn:=10^6: %p A386516 for n from 0 to 6 do : %p A386516 ii :=0 : %p A386516 for k from 0 to nn while(ii=0) do : %p A386516 d:=factorset(k^2+1):n0:=nops(d):it:=0: %p A386516 for i from 1 to n0 do: %p A386516 c:=d[i]-1:if sqrt(c) = floor(sqrt(c)) then it:=it+1:else fi: %p A386516 od: %p A386516 if it =n then ii :=1 :printf (`%d %d \n`,n,k): %p A386516 else %p A386516 fi : %p A386516 od: %p A386516 od : %t A386516 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 *) %Y A386516 Cf. A002522, A001912, A002496, A005574, A008784, A216784. %K A386516 nonn,more %O A386516 1,2 %A A386516 _Michel Lagneau_, Jul 24 2025 %E A386516 a(7) from _Giovanni Resta_, Jul 24 2025 %E A386516 a(8)-a(9) from _David A. Corneth_, Jul 24 2025