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.

A064427 a(n) = n + (number of primes < n).

Original entry on oeis.org

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

Views

Author

Santi Spadaro, Sep 30 2001

Keywords

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)

Crossrefs

Programs

  • Haskell
    a064427 1 = 1
    a064427 n = a000720 (n - 1) + toInteger n
    -- Reinhard Zumkeller, Apr 17 2012
    
  • Magma
    [1] cat [#PrimesUpTo(n-1)+n: n in [2..100]]; // Vincenzo Librandi, Feb 13 2016
  • Mathematica
    a[n_] := PrimePi[a[n-1]]+n; a[1]=1
    Table[PrimePi[n-1]+n,{n,60}] (* Harvey P. Dale, Apr 03 2015 *)
  • PARI
    a(n) = if (n==1, 1, primepi(n-1)+n); \\ Michel Marcus, Feb 13 2016
    

Formula

For n > 1: a(n) = n + A000720(n-1).

Extensions

Definition improved by Reinhard Zumkeller, Apr 16 2012
Edited by Jon E. Schoenfield, Nov 24 2023