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!)
A304904 Greatest prime p such that 2*n^2 - p is prime. 3
5, 13, 29, 47, 67, 79, 109, 157, 197, 239, 283, 331, 389, 443, 509, 571, 643, 719, 797, 877, 937, 1051, 1129, 1237, 1321, 1453, 1549, 1669, 1789, 1879, 2029, 2161, 2309, 2447, 2579, 2731, 2857, 3037, 3187, 3359, 3517 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Each square > 1 can be written as the average of 2 primes p1 < p2. a(n) gives the greatest prime p2 such that n^2 = (p1 + p2) / 2. The corresponding p1 is provided in A304903.
LINKS
FORMULA
a(n) = n^2 + A304905(n) = A304903(n) + 2*A304905(n).
EXAMPLE
a(6) = 67 because 2*6^2 - 67 = 5 is prime whereas 72 - 71 = 1 is not a prime.
PROG
(PARI) a304903(n) = forprime(p=3, , if(ispseudoprime(2*n^2-p), return(p)))
a(n) = 2*n^2-a304903(n) \\ Felix Fröhlich, May 20 2018
CROSSREFS
Sequence in context: A130066 A206258 A270106 * A095085 A309371 A230281
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, May 20 2018
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.)