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.

Showing 1-5 of 5 results.

A110589 Primes p such that 2*q+3 = p^2, where q is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 29, 31, 37, 41, 47, 67, 73, 79, 97, 101, 103, 109, 151, 157, 197, 211, 227, 233, 239, 257, 263, 293, 307, 331, 337, 349, 353, 359, 367, 389, 397, 409, 443, 449, 463, 487, 491, 509, 521, 547, 569, 571, 587, 613, 619, 653, 661, 673, 727
Offset: 1

Views

Author

Walter Kehowski, Sep 13 2005

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime((p^2-3) div 2)]; // Vincenzo Librandi, Mar 19 2015
  • Maple
    ispower := proc(n,b) andmap(proc(w) evalb(w[2] mod b = 0) end, ifactors(n)[2]) end: a:=2: SQRTP||a:=[]; for z from 1 to 1 do for n from 1 to 10000 do p:=ithprime(n); m:=a*p+a+1; if ispower(m,2) and isprime(sqrt(m)) then SQRTP||a:=[op(SQRTP||a),sqrt(m)] fi od; od; SQRTP||a;
  • Mathematica
    fQ[n_] := PrimeQ[(n^2 - 3)/2]; Select[ Prime@ Range@129, fQ@# &] (* Robert G. Wilson v, Jun 19 2006 *)
    Select[Table[Sqrt[2 Prime[n] + 3], {n, 1, 30000}], PrimeQ] (* Vincenzo Librandi, Mar 19 2015 *)

Extensions

More terms from Robert G. Wilson v, Jun 19 2006

A098828 Primes of the form 2*n^2 + 2*n - 1.

Original entry on oeis.org

3, 11, 23, 59, 83, 179, 263, 311, 419, 479, 683, 839, 1103, 1511, 2111, 2243, 2663, 2963, 3119, 4139, 4703, 5099, 5303, 5939, 7079, 10223, 11399, 12011, 12323, 12959, 17483, 19403, 21011, 21839, 22259, 24419, 25763, 27143, 27611, 28559, 30011
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 09 2004

Keywords

Comments

a(n)==3 (mod 4).
Equivalently primes p such that 2p+3 is square.
Also 3 followed by primes p of the form 2*n^2+6*n+3 = 2*(n+2)^2-2*(n+2)-1 (see the first comment) such that 2^(p-1)+3 is not prime. - Vincenzo Librandi, Jan 03 2009; M. F. Hasler, Jan 07 2009; R. J. Mathar, Jan 14 2009; Bruno Berselli, Sep 23 2013

Crossrefs

Programs

  • Magma
    [3] cat [ p: p in PrimesUpTo(30100) | exists(t){ n: n in [1..Isqrt(p div 2)] | 2*n^2+6*n+3 eq p } and not IsPrime(2^(p-1)+3) ];
    
  • Mathematica
    Select[Table[Prime[n], {n, 3500}], IntegerQ[(2# + 3)^(1/2)] &] (* Ray Chandler, Oct 26 2004 *)
  • PARI
    list(lim)=my(v=List()); for(n=1,oo, my(t=2*n*(n+1)-1); if(t>lim, return(Vec(v))); if(isprime(t), listput(v,t))) \\ Charles R Greathouse IV, Feb 26 2025

Formula

a(n) = (A109367(n) - 3)/2.

Extensions

Corrected by Ray Chandler, Oct 26 2004
Edited by N. J. A. Sloane, Jan 25 2009
Name edited by Charles R Greathouse IV, Feb 26 2025

A109367 Squares of the form 2*p + 3, where p is a prime.

Original entry on oeis.org

9, 25, 49, 121, 169, 361, 529, 625, 841, 961, 1369, 1681, 2209, 3025, 4225, 4489, 5329, 5929, 6241, 8281, 9409, 10201, 10609, 11881, 14161, 20449, 22801, 24025, 24649, 25921, 34969, 38809, 42025, 43681, 44521, 48841, 51529, 54289, 55225, 57121
Offset: 1

Views

Author

Giovanni Teofilatto, Aug 23 2005

Keywords

Comments

The first seven terms are primes squared: 3^2, 5^2, 7^2, 11^2, 13^2, 17^2, 19^2, 23^2.

Crossrefs

Programs

  • Mathematica
    Select[Table[(2Prime[n] + 3)^(1/2), {n, 3500}], IntegerQ]^2 (* Ray Chandler, Aug 25 2005 *)
    Select[2*Prime[Range[3500]]+3,IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Sep 07 2020 *)
  • PARI
    is(n)=issquare(n) && n%2 && isprime(n\2-1) \\ Charles R Greathouse IV, Aug 06 2013

Formula

a(n) = A109358(n)^2 = 2*A098828(n) + 3.

Extensions

Extended by Ray Chandler and Robert G. Wilson v, Aug 25 2005

A284036 Positive integers n such that (n^2 - 3)/2 and (n^2 + 1)/2 are twin primes.

Original entry on oeis.org

3, 5, 11, 19, 25, 29, 65, 79, 101, 205, 209, 221, 245, 275, 289, 299, 349, 371, 409, 415, 449, 521, 535, 569, 571, 575, 595, 649, 661, 695, 739, 781, 791, 935, 949, 991, 1081, 1091, 1099, 1129, 1181, 1225, 1241, 1285, 1345, 1349, 1459, 1489, 1531, 1541, 1615
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 27 2017

Keywords

Comments

All terms are obviously odd.

Examples

			25 is a term because (25^2 - 3)/2 = 311 and (25^2 + 1)/2 = 313 are twin primes.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime((n^2-3)/2) and isprime((n^2+1)/2):
    select(filter, [seq(i,i=1..2000,2)]); # Robert Israel, Apr 24 2017
  • Mathematica
    Select[Range[1, 1285, 2], Times @@ Boole@ Map[PrimeQ, (#^2 + {-3, 1})/2] == 1 &] (* Michael De Vlieger, Mar 28 2017 *)
  • PARI
    isok(n) = isprime((n^2 - 3)/2) && isprime((n^2 + 1)/2); \\ Michel Marcus, Apr 04 2017
    
  • Python
    from sympy import isprime
    print([n for n in range(3, 1700, 2) if isprime((n**2 - 3)//2) and isprime((n**2 + 1)//2)]) # Indranil Ghosh, Apr 04 2017
  • Sage
    [n for n in range(3,1700,2) if is_prime((n^2 - 3)//2) and is_prime((n^2 + 1)//2)]
    

A110588 Squares of the form 2*p+3 that are squares of primes.

Original entry on oeis.org

9, 25, 49, 121, 169, 361, 529, 841, 961, 1369, 1681, 2209, 4489, 5329, 6241, 9409, 10201, 10609, 11881, 22801, 24649, 38809, 44521, 51529, 54289, 57121, 66049, 69169, 85849, 94249, 109561, 113569, 121801, 124609
Offset: 1

Views

Author

Walter Kehowski, Sep 13 2005

Keywords

Crossrefs

Programs

  • Maple
    ispower := proc(n,b) andmap(proc(w) evalb(w[2] mod b = 0) end, ifactors(n)[2]) end: a:=2: PW||a:=[]; for z from 1 to 1 do for n from 1 to 1000 do p:=ithprime(n); m:=a*p+a+1; if ispower(m,2) and isprime(sqrt(m)) then PW||a:=[op(PW||a),m] fi od; od; PW||a;
  • PARI
    isok(n) = issquare(n) && isprime(sqrtint(n)) && (type(p=(n-3)/2) == "t_INT") && isprime(p) \\ Michel Marcus, Aug 06 2013
    
  • PARI
    v=List();forprime(p=2,1e4,if(isprime(p^2\2-1),listput(v,p^2))); Vec(v) \\ Charles R Greathouse IV, Aug 06 2013

Extensions

More terms from Michel Marcus, Aug 06 2013
Showing 1-5 of 5 results.