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.

A229496 Primes p of the form prime(n+1)^2-prime(n)^2+1.

Original entry on oeis.org

17, 73, 73, 313, 409, 313, 601, 673, 241, 769, 1033, 1489, 409, 433, 3361, 1033, 1609, 601, 1321, 2113, 769, 5209, 1801, 2833, 3049, 3121, 1129, 2473, 1249, 2521, 6841, 4273, 4441, 4513, 3049, 6481, 8521, 5233, 3529, 3673, 11353, 6073, 2089, 6529, 6793, 2281, 7321
Offset: 1

Views

Author

K. D. Bajpai, Sep 25 2013

Keywords

Examples

			a(1)=17:  prime(2+1)^2-prime(2)^2+1= 17,  which is prime.
a(6)=313:  prime(12+1)^2-prime(12)^2+1= 313,  which is prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,c,d; a:=ithprime(n+1)^2-ithprime(n)^2+1;if isprime(a) then RETURN(a): fi;end:seq(KD(),n=1..500);
  • Mathematica
    Select[Table[Prime[n + 1]^2 - Prime[n]^2 + 1, {n, 10^3}], PrimeQ[#] &]
    Select[#[[2]]-#[[1]]+1&/@Partition[Prime[Range[200]]^2,2,1],PrimeQ] (* Harvey P. Dale, May 21 2021 *)
  • PARI
    for(n=1,10^3,if(ispseudoprime(k=prime(n+1)^2-prime(n)^2+1),print1(k", ")))