login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125256 Smallest odd prime divisor of n^2 + 1. 7
5, 5, 17, 13, 37, 5, 5, 41, 101, 61, 5, 5, 197, 113, 257, 5, 5, 181, 401, 13, 5, 5, 577, 313, 677, 5, 5, 421, 17, 13, 5, 5, 13, 613, 1297, 5, 5, 761, 1601, 29, 5, 5, 13, 1013, 29, 5, 5, 1201, 41, 1301, 5, 5, 2917, 17, 3137, 5, 5, 1741, 13, 1861, 5, 5, 17, 2113, 4357, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Any odd prime divisor of n^2+1 is congruent to 1 modulo 4.
n^2+1 is never a power of 2 for n > 1; hence a prime divisor congruent to 1 modulo 4 always exists.
a(n) = 5 if and only if n is congruent to 2 or -2 modulo 5.
If the map "x -> smallest odd prime divisor of n^2+1" is iterated, does it always terminate in the 2-cycle (5 <-> 13)? - Zoran Sunic, Oct 25 2017
REFERENCES
D. M. Burton, Elementary Number Theory, McGraw-Hill, Sixth Edition (2007), p. 191.
LINKS
Ray Chandler, Table of n, a(n) for n = 2..20001 (first 999 terms from Nick Hobson)
EXAMPLE
The prime divisors of 8^2 + 1 = 65 are 5 and 13, so a(7) = 5.
MAPLE
with(numtheory, factorset);
A125256 := proc(n) local t1, t2;
if n <= 1 then return(-1); fi;
if (n mod 5) = 2 or (n mod 5) = 3 then return(5); fi;
t1 := numtheory[factorset](n^2+1);
t2:=sort(convert(t1, list));
if (n mod 2) = 1 then return(t2[2]); fi;
t2[1];
end;
[seq(A125256(n), n=1..40)]; # N. J. A. Sloane, Nov 04 2017
PROG
(PARI) vector(68, n, if(n<2, "-", factor(n^2+1)[1+(n%2), 1]))
(PARI) A125256(n)=factor(n^2+1)[1+bittest(n, 0), 1] \\ M. F. Hasler, Nov 06 2017
CROSSREFS
For bisections see A256970, A293958.
Sequence in context: A273855 A175614 A214022 * A228564 A075684 A146876
KEYWORD
easy,nonn
AUTHOR
Nick Hobson, Nov 26 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)