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.

A261889 Primes that are the square of the sum of a twin prime pair plus 1.

Original entry on oeis.org

577, 1297, 7057, 14401, 41617, 90001, 147457, 156817, 484417, 746497, 1299601, 1742401, 2702737, 2944657, 4260097, 5308417, 6051601, 6780817, 8785297, 10497601, 14107537, 15210001, 16451137, 17438977, 18147601, 29419777, 38937601, 45968401, 51322897, 56791297
Offset: 1

Views

Author

K. D. Bajpai, Sep 05 2015

Keywords

Comments

Alternatively: Primes of the form (p + q)^2 + 1 where p and q are twin primes.
All the terms are congruent to 1 (mod 3).

Examples

			577 appears in the sequence because it is a prime resulting from twin prime pair (11,13): (11 + 13)^2 + 1 = 577.
7057 appears in the sequence because it is a prime resulting from twin prime pair (41,43): (41 + 43)^2 + 1 = 7057.
		

Crossrefs

Programs

  • Magma
    [k : p in PrimesUpTo (10000) | IsPrime(p+2) and IsPrime(k) where k is ((p + p + 2)^2 + 1)];
  • Maple
    A261889:= proc() local a, b, d; a:= ithprime(n); b:=a+2; d:=(a+b)^2+1; if isprime(b)and isprime(d) then return (d): fi; end: seq(A261889 (), n=1..10000);
  • Mathematica
    A261889 = {}; Do[p1 = Prime[n]; p2 = p1 + 2; p = (p1 + p2)^2 + 1; If[PrimeQ[p2] &&  PrimeQ[p], AppendTo[A261889, p]], {n, 1, 10000}]; A261889
  • PARI
    forprime(p = 1,10000, if(isprime(p+2) && isprime((p + p + 2)^2 + 1), print1(( (p + p + 2)^2 + 1), ", ")));
    
  • PARI
    list(lim)=my(v=List(),t,p=2); forprime(q=3,sqrtint(lim\1-1)\2+1, if(q-p==2 && isprime(t=(p+q)^2+1), listput(v,t)); p=q); Vec(v) \\ Charles R Greathouse IV, Sep 06 2015