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!)
A344463 a(n) is the least prime p such that (p^2-2*n)/(2*n-1) and (p^2+2*n)/(2*n+1) are both prime, or 0 if such p does not exist. 1
2, 0, 239, 251, 2069, 131, 521, 0, 2243, 379, 643, 40849, 89101, 11717, 81839, 18787, 659, 0, 2887, 41081, 199261, 13931, 4231, 223439, 17443, 953, 3499, 6689, 122131, 298777, 9883, 0, 93131, 12329, 48989, 67307, 9199, 44549, 13903, 294353, 605071, 42331, 7309, 167677, 41651, 46747, 129581 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = 0 if 2*n is a square.
LINKS
EXAMPLE
a(3) = 239 because 239, (239^2-2*3)/(2*3-1) = 11423, and (239^2+2*3)/(2*3+1) = 8161 are primes, and no smaller prime works.
MAPLE
f:= proc(n) local M, p, i, j;
if issqr(2*n) then return 0 fi;
M:= sort(map(t -> rhs(op(t)), [msolve(p^2=1, 4*n^2-1)]));
for i from 0 to 10^6 do
for j in M do
p:= i*(4*n^2-1)+j;
if isprime(p) and isprime((p^2-2*n)/(2*n-1)) and isprime((p^2+2*n)/(2*n+1)) then return p fi
od od;
FAIL
end proc:
map(f, [$1..100]);
CROSSREFS
Cf. A001105.
Sequence in context: A037096 A111814 A036938 * A221750 A284451 A348183
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 19 2021
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 August 9 23:12 EDT 2024. Contains 375044 sequences. (Running on oeis4.)