Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Mar 30 2012 17:23:05
%S 1,2,8,4,12,6,32,30,50,46,34,22,10,76,98,100,44,28,80,162,112,14,122,
%T 144,64,16,82,60,228,138,288,114,148,136,42,104,274,334,20,266,392,
%U 254,382,348,48,208,286,52,118,86,24,516,476,578,194,154,504,106,58,26,566,96,380,670,722,62,456,582,318,526,246,520,650,726,494,324
%N Least m > 0 such that the prime p=A002313(n+1) divides m^2+1.
%C This yields the prime factors of numbers of the form N^2+1, cf. formula in A089120: For n=0,1,2,... check whether N = +/- a(n) [mod 2*A002313(n+1)], if so, then A002313(n+1) is a prime factor of N^2+1.
%C Obviously, p then divides (2kp +/- a(n))^2+1 for all k >=0 ; in particular it will be the least prime factor of such numbers if there is no earlier match.
%C Alternatively one could deal separately with the case of odd N, for which p=2 divides N^2+1, and even N, for which only Pythagorean primes A002144(n)=A002313(n+1) can be prime factors of N^2+1.
%F For n>0, A209874(n) = 2*sqrt(-1/4 mod A002144(n)), where sqrt(a mod p) stands for the positive x < p/2 such that x^2=a in Z/pZ.
%F A209874(n) = A209877(n)*2 for n>0.
%o (PARI) A209874(n)=if( n, 2*lift(sqrt(Mod(-1, A002144[n])/4)), 1)
%o (PARI) /* for illustrative purpose: a(n) is the smaller of the 2 possible remainders mod 2*p of numbers N such that N^2+1 has p as smallest prime factor */ forprime( p=1,199, p>2 & p%4 != 1 & next; my(c=[]); for(i=1,9e9, factor(i^2+1)[1,1]==p |next; c=vecsort(concat(c,i%(2*p)),,8); #c==1 || print1(","c[1]) || break))
%Y Cf. A002496, A014442, A085722, A144255, A089120, A193432.
%Y Cf. A002314, A177979.
%K nonn
%O 0,2
%A _M. F. Hasler_, Mar 11 2012