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.

A014683 In the sequence of positive integers add 1 to each prime number.

Original entry on oeis.org

1, 3, 4, 4, 6, 6, 8, 8, 9, 10, 12, 12, 14, 14, 15, 16, 18, 18, 20, 20, 21, 22, 24, 24, 25, 26, 27, 28, 30, 30, 32, 32, 33, 34, 35, 36, 38, 38, 39, 40, 42, 42, 44, 44, 45, 46, 48, 48, 49, 50, 51, 52, 54, 54, 55, 56, 57, 58, 60, 60, 62, 62, 63, 64, 65, 66, 68, 68, 69, 70, 72, 72
Offset: 1

Views

Author

Keywords

Comments

For n >= 3, a(n) = smallest composite number m such that m - (n-2) is a prime. - Amarnath Murthy and Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Mar 08 2003
Möbius transform of sigma(n)+omega(n) = A380457(n). - Wesley Ivan Hurt, Jun 22 2025

Crossrefs

Programs

  • Haskell
    a014683 n = n + a010051' n  -- Reinhard Zumkeller, Nov 01 2014
    
  • Mathematica
    Array[If[PrimeQ[#],#+1,#]&,80] (* Harvey P. Dale, Jul 21 2013 *)
  • PARI
    a(n)=n+isprime(n)
    
  • Python
    from sympy import isprime
    def A014683(n): return n+isprime(n) # Chai Wah Wu, Oct 03 2024

Formula

a(n) = n + pi(n) - pi(n-1). - Wesley Ivan Hurt, Jun 15 2013
a(n) = n + A010051(n). - Reinhard Zumkeller, Nov 01 2014
a(n) = Sum_{d|n} A380457(d)*mu(n/d). - Wesley Ivan Hurt, Jun 22 2025

Extensions

More terms from Erich Friedman.