login
A064427
a(n) = n + (number of primes < n).
4
1, 2, 4, 6, 7, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 77, 78, 80, 81, 82
OFFSET
1,2
COMMENTS
From Jaroslav Krizek, Dec 10 2009: (Start)
Complement of A014688.
Numbers that are not the sum of k and the k-th prime for any k >= 1. (End)
LINKS
Carlos Rivera, Puzzle 821. Prime numbers and complementary sequences, The Prime Puzzles & Problems Connection.
Eric Weisstein's World of Mathematics, Prime Counting Function.
FORMULA
For n > 1: a(n) = n + A000720(n-1).
MATHEMATICA
a[n_] := PrimePi[a[n-1]]+n; a[1]=1
Table[PrimePi[n-1]+n, {n, 60}] (* Harvey P. Dale, Apr 03 2015 *)
PROG
(Haskell)
a064427 1 = 1
a064427 n = a000720 (n - 1) + toInteger n
-- Reinhard Zumkeller, Apr 17 2012
(PARI) a(n) = if (n==1, 1, primepi(n-1)+n); \\ Michel Marcus, Feb 13 2016
(Magma) [1] cat [#PrimesUpTo(n-1)+n: n in [2..100]]; // Vincenzo Librandi, Feb 13 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Santi Spadaro, Sep 30 2001
EXTENSIONS
Definition improved by Reinhard Zumkeller, Apr 16 2012
Edited by Jon E. Schoenfield, Nov 24 2023
STATUS
approved