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 A209874 #14 Mar 30 2012 17:23:05 %S A209874 1,2,8,4,12,6,32,30,50,46,34,22,10,76,98,100,44,28,80,162,112,14,122, %T A209874 144,64,16,82,60,228,138,288,114,148,136,42,104,274,334,20,266,392, %U A209874 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 A209874 Least m > 0 such that the prime p=A002313(n+1) divides m^2+1. %C A209874 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 A209874 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 A209874 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 A209874 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 A209874(n) = A209877(n)*2 for n>0. %o A209874 (PARI) A209874(n)=if( n, 2*lift(sqrt(Mod(-1, A002144[n])/4)), 1) %o A209874 (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 A209874 Cf. A002496, A014442, A085722, A144255, A089120, A193432. %Y A209874 Cf. A002314, A177979. %K A209874 nonn %O A209874 0,2 %A A209874 _M. F. Hasler_, Mar 11 2012