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!)
A089751 a(n) = the first prime in the orbit of n under f(n) = n^2 + 1, if it exists; = 0 otherwise. 0

%I #6 Feb 11 2014 19:05:42

%S 2,2,3,17,5,37,7,17859077

%N a(n) = the first prime in the orbit of n under f(n) = n^2 + 1, if it exists; = 0 otherwise.

%C Question: Is a(n) > 0 for all n?

%C a(9) may be equal to 0. - _Michel Marcus_, May 19 2013

%e 4 -> 4^2 + 1 = 17 (prime). So a(4) = 17.

%o (PARI) a(n) = {while(! isprime(n), n = n^2 + 1;); return (n);} \\ _Michel Marcus_, May 19 2013

%Y Cf. A002522.

%K nonn,more

%O 1,1

%A _Joseph L. Pe_, Jan 08 2004

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 September 7 13:22 EDT 2024. Contains 375730 sequences. (Running on oeis4.)