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!)
A230010 a(n) = smallest prime p such that n*(p^2 + 1) + 1 is also prime or 0 if no such prime exists. 1
3, 2, 3, 3, 5, 2, 3, 2, 13, 3, 13, 2, 3, 2, 3, 0, 5, 3, 3, 2, 3, 0, 5, 3, 3, 2, 3, 3, 7, 2, 3, 7, 3, 0, 5, 2, 0, 2, 7, 3, 11, 2, 3, 13, 5, 3, 5, 2, 3, 2, 5, 3, 13, 2, 0, 2, 3, 0, 23, 3, 0, 2, 3, 3, 7, 2, 0, 11, 3, 3, 5, 5, 0, 7, 3, 3, 5, 5, 0, 2, 3, 3, 17, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If n*3^2+n+1 is not prime and (n-1) is divisible by 3 then a(n) = 0.
The first such case is n = 16 when 161 is not prime and (16-1) is 5*3, while a(1,4,7,10,13) = 3.
LINKS
EXAMPLE
a(4) = 3, since p = 3 is prime and 4*p^2 + 4 + 1 = 36 + 4 + 1 = 41 is also prime.
PROG
(PARI) a(n) = {if (! isprime(10*n+1) && !((n-1) % 3), return (0)); p = 2; while ( !isprime(n*p^2 + n + 1), p = nextprime(p+1)); p; } \\ Michel Marcus, Dec 20 2013
CROSSREFS
Sequence in context: A242409 A317623 A286244 * A230847 A234300 A181672
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 20 2013
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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)