login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028871 Primes of the form n^2 - 2. 35
2, 7, 23, 47, 79, 167, 223, 359, 439, 727, 839, 1087, 1223, 1367, 1847, 2207, 2399, 3023, 3719, 3967, 4759, 5039, 5623, 5927, 7919, 8647, 10607, 11447, 13687, 14159, 14639, 16127, 17159, 18223, 19319, 21023, 24023, 25919, 28559, 29927 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Except for the initial term, primes equal to the product of two consecutive even numbers minus 1. - Giovanni Teofilatto, Sep 24 2004

With exception of the first term 2, primes p such that continued fraction of (1+sqrt(p))/2 have period 4. - Artur Jasinski, Feb 03 2010

Subsequence of A094786. First primes q that are in A094786 but not here are 241, 3373, 6857, 19681, 29789, 50651, 300761, 371291, ...; q+2 are perfect powers m^k with odd k>1. - Zak Seidov, Dec 09 2014

REFERENCES

D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 31.

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 1..10000

P. De Geest, Palindromic Quasipronics of the form n(n+x)

Eric Weisstein's World of Mathematics, Near-Square Prime

EXAMPLE

a(3) = 23 = 5^2 - 2 = A028870(3)^2 - 2.

MAPLE

select(isprime, [2, seq((2*n+1)^2-2, n=1..1000)]); # Robert Israel, Dec 09 2014

MATHEMATICA

lst={}; Do[s=n^2; If[PrimeQ[p=s-2], AppendTo[lst, p]], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 26 2008 *)

aa = {}; Do[If[4 == Length[ContinuedFraction[(1 + Sqrt[Prime[m]])/2][[2]]], AppendTo[aa, Prime[m]]], {m, 1, 1000}]; aa (* Artur Jasinski, Feb 03 2010 *)

Select[Table[n^2 - 2, {n, 400}], PrimeQ] (* Vincenzo Librandi, Jun 19 2014 *)

PROG

(PARI) list(lim)=select(n->isprime(n), vector(sqrtint(floor(lim)+2), k, k^2-2)) \\ Charles R Greathouse IV, Jul 25 2011

(Haskell)

a028871 n = a028871_list !! (n-1)

a028871_list = filter ((== 1) . a010051') a008865_list

-- Reinhard Zumkeller, May 06 2013

(MAGMA) [p: p in PrimesUpTo(100000)| IsSquare(p+2)]; // Vincenzo Librandi, Jun 19 2014

CROSSREFS

Cf. A028870, A089623, A010051, A094786; subsequence of A008865.

Sequence in context: A049552 A049572 A094786 * A053705 A247175 A049001

Adjacent sequences:  A028868 A028869 A028870 * A028872 A028873 A028874

KEYWORD

nonn,easy,changed

AUTHOR

Patrick De Geest

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified December 19 03:55 EST 2014. Contains 252175 sequences.