

A040976


a(n) = prime(n)  2.


47



0, 1, 3, 5, 9, 11, 15, 17, 21, 27, 29, 35, 39, 41, 45, 51, 57, 59, 65, 69, 71, 77, 81, 87, 95, 99, 101, 105, 107, 111, 125, 129, 135, 137, 147, 149, 155, 161, 165, 171, 177, 179, 189, 191, 195, 197, 209, 221, 225, 227, 231, 237, 239, 249, 255, 261
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Numbers n such that n! reduced mod(n+2) is 1.  Benoit Cloitre, Mar 11 2002
The first a(n) numbers starting from 2 are divisible by primes up to p(n1).  Lekraj Beedassy, Jun 21 2006
The terms in this sequence are the cumulative sums of distances from one prime to another. For example for the distance from the first to 26th prime, 2 to 101, the cumulative sum of distances is 99, always the last prime, here 101, minus 2.  Enoch Haga, Apr 24 2006
The primes in this sequence are the initial primes of pairs of twin primes.  Sebastiao Antonio da Silva, Dec 21 2008
For n > 2: A092953(a(n)) = 1.  Reinhard Zumkeller, Nov 10 2012
Note that many, but not all, of these numbers satisfy x such that x^(x+1) = 1 mod (x+2). The first exception is 339.  Thomas Ordowski, Nov 27 2013
If this sequence has an infinite number of primes, the twin prime conjecture would follow. Sequence holds all primes in A001359(n).  John W. Nicholson, Apr 14 2014


LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
S. A. Khan, Primes in GeometricArithmetic Progression, arXiv preprint arXiv:1203.2083, 2012.


FORMULA

a(n) = A000040(n)  2 = sum(i=1,n1,A001223(i)).


EXAMPLE

a(13) = 39, because A000040(13) = 41.


MATHEMATICA

Prime[Range[22]]2 (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)


PROG

(Haskell)
a040976 n = a000040 n  2
a040976_list = map (subtract 2) a000040_list
 Reinhard Zumkeller, Feb 22 2012
(PARI) a(n)=prime(n)2 \\ Charles R Greathouse IV, Nov 20 2012


CROSSREFS

Cf. A000040, A001223, A014689, A014692.
Sequence in context: A024896 A160771 A249426 * A268174 A166104 A164121
Adjacent sequences: A040973 A040974 A040975 * A040977 A040978 A040979


KEYWORD

nonn,nice,easy


AUTHOR

Felice Russo


STATUS

approved



