%I #13 Sep 08 2022 08:46:10
%S 46,104,186,220,244,360,394,510,534,626,766,800,916,940,974,1056,1090,
%T 1114,1206,1264,1346,1380,1404,1496,1520,1554,1694,1810,1844,1926,
%U 1960,2076,2100,2134,2216,2250,2366,2390,2424,2506,2564,2680,2714,2796,2830,2854
%N Numbers n such that the smallest prime divisor of n^2+1 is 29.
%C Or numbers n such that the smallest prime divisor of n^2+1 is A002313(5).
%C a(n)== 12 or 46 (mod 58).
%H Amiram Eldar, <a href="/A248529/b248529.txt">Table of n, a(n) for n = 1..10000</a>
%e 46 is in the sequence because 46^2+1= 29*73.
%t lst={};Do[If[FactorInteger[n^2+1][[1, 1]]==29, AppendTo[lst, n]], {n, 2, 2000}]; lst
%t p = 29; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[3000], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* _Amiram Eldar_, Aug 16 2019 *)
%t Select[Range[2,3000,2],FactorInteger[#^2+1][[1,1]]==29&] (* or *) Select[ Flatten[ #+{12,46}&/@(58*Range[0,60])],FactorInteger[#^2+1][[1,1]]==29&](* _Harvey P. Dale_, Jul 01 2022 *)
%o (Magma) [n: n in [2..3000] | PrimeDivisors(n^2+1)[1] eq 29]; // _Bruno Berselli_, Oct 08 2014
%Y Cf. A089120, A002313, A209874, A248527, A248528.
%K nonn,easy
%O 1,1
%A _Michel Lagneau_, Oct 08 2014