cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Sep 02 2024

Keywords

Examples

			11 is a term because 11*nextprime(11)+1 = 12^2 and 11 + nextprime(11)+1 = 5^2.
		

Crossrefs

Intersection of A001359 and A242384.

Programs

  • 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 *)