login
A375912
Primes p such that p*nextprime(p)+1 and p + nextprime(p)+1 are both perfect squares where nextprime(p) is the smallest prime that is larger than p.
0
3, 11, 59, 179, 311, 419, 2111, 3119, 5099, 21011, 21839, 24419, 30011, 37811, 41759, 44699, 60899, 68819, 83639, 86111, 100799, 135719, 143111, 161879, 163019, 165311, 177011, 210599, 218459, 241511, 273059, 304979, 312839, 437111, 450299, 491039, 584279, 595139, 603899, 637319
OFFSET
1,1
EXAMPLE
11 is a term because 11*nextprime(11)+1 = 12^2 and 11 + nextprime(11)+1 = 5^2.
MAPLE
nn:=10^5:
for n from 1 to nn do:
p:=ithprime(n):q:=nextprime(p):p1:=sqrt(p*q+1):p2:=sqrt(q+p+1):
if floor(p1) = p1 and floor(p2)=p2
then
printf(`%d, `, p):
else
fi:
od:
MATHEMATICA
Select[Partition[Prime[Range[100000]], 2, 1], IntegerQ[Sqrt[#[[1]] + #[[2]] + 1]] && IntegerQ[Sqrt[#[[1]]*#[[2]] + 1]] &][[;; , 1]] (* Amiram Eldar, Sep 02 2024 *)
CROSSREFS
Intersection of A001359 and A242384.
Sequence in context: A242384 A225809 A267607 * A319248 A340865 A290484
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 02 2024
STATUS
approved