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.

Showing 1-4 of 4 results.

A008864 a(n) = prime(n) + 1.

Original entry on oeis.org

3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272, 278, 282, 284
Offset: 1

Views

Author

Keywords

Comments

Sum of divisors of prime(n). - Labos Elemer, May 24 2001
For n > 1, there are a(n) more nonnegative Hurwitz quaternions than nonnegative Lipschitz quaternions, which are counted in A239396 and A239394, respectively. - T. D. Noe, Mar 31 2014
These are the numbers which are in A239708 or in A187813, but excluding the first 3 terms of A187813, i.e., a number m is a term if and only if m is a term > 2 of A187813, or m is the sum of two distinct powers of 2 such that m - 1 is prime. This means that a number m is a term if and only if m is a term > 2 such that there is no base b with a base-b digital sum of b, or b = 2 is the only base for which the base-b digital sum of m is b. a(6) is the only term such that a(n) = A187813(n); for n < 6, we have a(n) > A187813(n), and for n > 6, we have a(n) < A187813(n). - Hieronymus Fischer, Apr 10 2014
Does not contain any number of the format 1 + q + ... + q^e, q prime, e >= 2, i.e., no terms of A060800, A131991, A131992, A131993 etc. [Proof: that requires 1 + p = 1 + q + ... + q^e, or p = q*(1 + ... + q^(e-1)). This is not solvable because the left hand side is prime, the right hand side composite.] - R. J. Mathar, Mar 15 2018
1/a(n) is the asymptotic density of numbers whose prime(n)-adic valuation is odd. - Amiram Eldar, Jan 23 2021

References

  • C. W. Trigg, Problem #1210, Series Formation, J. Rec. Math., 15 (1982), 221-222.

Crossrefs

Column 1 of A341605, column 2 of A286623 and of A328464.
Partial sums of A125266.

Programs

Formula

a(n) = prime(n) + 1 = A000040(n) + 1.
a(n) = A000005(A034785(n)) = A000203(A000040(n)). - Labos Elemer, May 24 2001
a(n) = A084920(n) / A006093(n). - Reinhard Zumkeller, Aug 06 2007
A239703(a(n)) <= 1. - Hieronymus Fischer, Apr 10 2014
From Ilya Gutkovskiy, Jul 30 2016: (Start)
a(n) ~ n*log(n).
Product_{n>=1} (1 + 2/(a(n)*(a(n) - 2))) = 5/2. (End)

A007918 Least prime >= n (version 1 of the "next prime" function).

Original entry on oeis.org

2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73, 73
Offset: 0

Views

Author

R. Muller and Charles T. Le (charlestle(AT)yahoo.com)

Keywords

Comments

Version 2 of the "next prime" function is "smallest prime > n". This produces A151800.
Maple uses version 2.
According to the "k-tuple" conjecture, a(n) is the initial term of the lexicographically earliest increasing arithmetic progression of n primes; the corresponding common differences are given by A061558. - David W. Wilson, Sep 22 2007
It is easy to show that the initial term of an increasing arithmetic progression of n primes cannot be smaller than a(n). - N. J. A. Sloane, Oct 18 2007
Also, smallest prime bounded by n and 2n inclusively (in accordance with Bertrand's theorem). Smallest prime >n is a(n+1) and is equivalent to smallest prime between n and 2n exclusively. - Lekraj Beedassy, Jan 01 2007
Run lengths of successive equal terms are given by A125266. - Felix Fröhlich, May 29 2022
Conjecture: if n > 1, then a(n) < n^(n^(1/n)). - Thomas Ordowski, Feb 23 2023

Crossrefs

Programs

  • Haskell
    a007918 n = a007918_list !! n
    a007918_list = 2 : 2 : 2 : concat (zipWith
                  (\p q -> (replicate (fromInteger(q - p)) q))
                                       a000040_list $ tail a000040_list)
    -- Reinhard Zumkeller, Jul 26 2012
    
  • Magma
    [2] cat [NextPrime(n-1): n in [1..80]]; // Vincenzo Librandi, Jan 14 2016
    
  • Maple
    A007918 := n-> nextprime(n-1); # M. F. Hasler, Apr 09 2008
  • Mathematica
    NextPrime[Range[-1, 72]] (* Jean-François Alcover, Apr 18 2011 *)
  • PARI
    A007918(n)=nextprime(n)  \\ M. F. Hasler, Jun 24 2011
    
  • PARI
    for(x=0,100,print1(nextprime(x)",")) \\ Cino Hilliard, Jan 15 2007
    
  • Python
    from sympy import nextprime
    def A007918(n): return nextprime(n-1) # Chai Wah Wu, Apr 22 2022

Formula

For n > 1: a(n) = A000040(A049084(A007917(n)) + 1 - A010051(n)). - Reinhard Zumkeller, Jul 26 2012
a(n) = A151800(n-1). - Seiichi Manyama, Apr 02 2018

A075526 a(n) = A008578(n+2) - A008578(n+1).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2002

Keywords

Comments

n appears this number of times in A000720. - Lekraj Beedassy, Jun 19 2006
a(0) = 1, for n >= 1: a(n) = differences between consecutive primes (A001223(n)) = A158611(n+2) - A158611(n+1). Partial sums give A006093 (shifted). - Jaroslav Krizek, Aug 04 2009
First differences of noncomposite numbers. - Juri-Stepan Gerasimov, Feb 17 2010
This is 1 together with A001223. A054541 is 2 together with A001223. A125266 is 3 together with A001223. - Omar E. Pol, Nov 01 2013

Crossrefs

Programs

Formula

a(n) = A001223(n) for n>0.

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010

A054541 Sum of first n terms equals n-th prime.

Original entry on oeis.org

2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6
Offset: 1

Views

Author

G. L. Honaker, Jr., Apr 09 2000

Keywords

Comments

Except for first term, same as A001223.
First differences of A182986. - Omar E. Pol, Oct 31 2013
A075526 is 1 together with A001223. This is 2 together with A001223. A125266 is 3 together with A001223. - Omar E. Pol, Nov 01 2013
Convolved with A024916 gives A086718. - Omar E. Pol, Dec 23 2021

Crossrefs

Partial sums give A000040.

Programs

  • Mathematica
    Join[{2},Differences[Prime[Range[100]]]] (* Paolo Xausa, Oct 25 2023 *)
  • PARI
    a(n) = if (n==1, 2, prime(n) - prime(n-1)); \\ Michel Marcus, Oct 31 2013

Extensions

More terms from James Sellers, Apr 11 2000
Showing 1-4 of 4 results.