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.

A226993 Primes p such that 2p - 1 and 2p + 1 are squarefree.

Original entry on oeis.org

2, 3, 7, 11, 17, 19, 29, 43, 47, 53, 71, 79, 83, 89, 97, 101, 107, 109, 127, 151, 173, 179, 191, 197, 199, 223, 227, 233, 241, 251, 271, 277, 281, 307, 317, 331, 349, 353, 359, 379, 389, 397, 431, 439, 443, 449, 457, 461, 467, 479, 503, 521, 523, 547, 557, 569
Offset: 1

Views

Author

Irina Gerasimova, Jun 26 2013

Keywords

Examples

			3 is in the sequence because 3 is prime and both 2*3 - 1 = 5 and 2*3 + 1 = 7 are squarefree.
		

Crossrefs

Cf. A005117.

Programs

  • Maple
    with(numtheory); P:=proc(q) local n; for n from 1 to q do
    if isprime(n) then if issqrfree(2*n-1) and issqrfree(2*n+1) then print(n)
    fi; fi; od; end: P(10^5); #Paolo P. Lava, Jun 26 2013
  • PARI
    is(n)=isprime(n)&&issquarefree(2*n-1)&&issquarefree(2*n+1) \\ Charles R Greathouse IV, Jun 27 2013