A040976 a(n) = prime(n) - 2.
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
Offset: 1
Examples
a(13) = 39, because A000040(13) = 41.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- S. A. Khan, Primes in Geometric-Arithmetic Progression, arXiv preprint arXiv:1203.2083 [math.NT], 2012.
- S. M. Ruiz and J. Sondow, Formulas for pi(n) and the n-th prime, arXiv:math/0210312 [math.NT], 2002-2014.
- Wikipedia, Primes in arithmetic progression.
- Index entries for sequences related to primes in arithmetic progressions.
Crossrefs
Programs
-
GAP
Filtered([1..10^2],IsPrime)-2; # Muniru A Asiru, Jan 31 2018
-
Haskell
a040976 n = a000040 n - 2 a040976_list = map (subtract 2) a000040_list -- Reinhard Zumkeller, Feb 22 2012
-
Magma
[NthPrime(n)-2: n in [1..60]]; // Vincenzo Librandi, Jan 31 2018
-
Maple
seq(ithprime(n)-2,n=1..100); # Muniru A Asiru, Jan 31 2018
-
Mathematica
Prime[Range[22]]-2 (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
-
PARI
a(n)=prime(n)-2 \\ Charles R Greathouse IV, Nov 20 2012
Formula
For n > 2: A092953(a(n)) = 1. - Reinhard Zumkeller, Nov 10 2012
If m is a term then A123556(m) = 2, but the converse is false: a counterexample is A123556(16) = 2 and 16 is not a term. - Bernard Schott, Feb 19 2023
a(n) = Sum_{k = 2..floor(2n*log(n)+2)} (1-floor(A000720(k)/n)). [Ruiz and Sondow]. - Elias Alejandro Angulo Klein, Apr 09 2024
Comments