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.

A110284 Squares of the form 4p - 3, where p is a prime.

Original entry on oeis.org

9, 25, 49, 121, 169, 289, 625, 841, 961, 1225, 1681, 1849, 2401, 3025, 4489, 5929, 6889, 10201, 11881, 13225, 14161, 15625, 17689, 19321, 20449, 22801, 24025, 24649, 25921, 32041, 32761, 39601, 41209, 44521, 48841, 49729, 55225, 57121, 69169
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 07 2005

Keywords

Comments

Also: squares of the form 2*s-3, where s is a semiprime, A107317. - Franklin T. Adams-Watters, Jun 28 2010
Squares are less dense then primes and easy to generate so it's faster to check squares if they are of the required form than to check if primes are of the required form. - David A. Corneth, Oct 15 2018

Crossrefs

Programs

  • Magma
    [4*p - 3: p in PrimesUpTo(10^5)|IsSquare (4*p - 3)]; // Vincenzo Librandi, Oct 17 2018
  • Mathematica
    Select[ 4Prime[ Range[2000]] - 3, IntegerQ[ Sqrt[ # ]] &] (* Robert G. Wilson v, Sep 20 2005 *)
  • PARI
    isok(n) = issquare(n) && (p=(n+3)/4) && (frac(p)==0) && isprime(p); \\ Michel Marcus, Oct 15 2018
    
  • PARI
    upto(n) = my(res = List()); forstep(i = 3, sqrtint(n), 2, if(isprime((i^2+3)/4), listput(res, i^2))); res \\ David A. Corneth, Oct 15 2018
    

Formula

a(n) = 4*A002383(n) - 3 = A088503(n-1)^2.

Extensions

Extended by Ray Chandler, Sep 07 2005