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-3 of 3 results.

A014688 a(n) = n-th prime + n.

Original entry on oeis.org

3, 5, 8, 11, 16, 19, 24, 27, 32, 39, 42, 49, 54, 57, 62, 69, 76, 79, 86, 91, 94, 101, 106, 113, 122, 127, 130, 135, 138, 143, 158, 163, 170, 173, 184, 187, 194, 201, 206, 213, 220, 223, 234, 237, 242, 245, 258, 271, 276, 279, 284, 291, 294, 305, 312, 319, 326
Offset: 1

Views

Author

Keywords

Comments

Conjecture: this sequence contains an infinite number of primes (A061068), yet contains arbitrarily long "prime deserts" such as the 11 composites in A014688 between a(6) = 19 and a(18) = 79 and the 17 composites in A014688 between a(48) = 271 and a(66) = 383. - Jonathan Vos Post, Nov 22 2004
Does an n exist such that n*prime(n)/(n+prime(n)) is an integer? - Ctibor O. Zizka, Mar 04 2008. The answer to Zizka's question is easily seen to be No: such an integer k would be positive and less than prime(n), but then k*(n + prime(n)) = prime(n)*n would be impossible. - Robert Israel, Apr 20 2015
Complement of A064427. - Jaroslav Krizek, Oct 28 2009
According to a theorem of Lu and Deng (see LINKS), there exists at least one prime number p such that a(n)-n < p <= a(n); equivalently pi(a(n)) - pi(a(n)-n) >= 1 (see A332086). For example, prime number 3 is in the range of (2,3], 5 in (3,5], 7 in (5,8], and 29 & 31 in (23,32]. - Ya-Ping Lu, Sep 02 2020

Crossrefs

Programs

Formula

a(n) = n + A000040(n) = n + A008578(n+1) = n + A158611(n+2). - Jaroslav Krizek, Aug 31 2009
a(n) = A090178(n+1) - 1 = (n+1)-th noncomposite number + n for n >= 2. a(n) = A167136(n+1). a(1) = 3, a(n) = a(n-1) + A008578(n+1) - A008578(n) + 1 for n >= 2. a(1) = 3, a(n) = a(n-1) + A001223(n-1) + 1 for n >= 3. - Jaroslav Krizek, Oct 28 2009
a(n) = 2*OR(p,n) - XOR(p,n), for n-th prime p. - Gary Detlefs, Oct 26 2013
a(n) = A078916(n) - n. - Zak Seidov, Nov 10 2013

Extensions

More terms from Vasiliy Danilov (danilovv(AT)usa.net), Jul 1998
Corrected for changes of offsets of A008578 and A158611 by Jaroslav Krizek, Oct 28 2009

A095117 a(n) = pi(n) + n, where pi(n) = A000720(n) is the number of primes <= n.

Original entry on oeis.org

0, 1, 3, 5, 6, 8, 9, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 54, 55, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 91
Offset: 0

Views

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Comments

Positions of first occurrences of n in A165634: A165634(a(n))=n for n>0. - Reinhard Zumkeller, Sep 23 2009
There exists at least one prime number p such that n < p <= a(n) for n >= 2. For example, 2 is in (2, 3], 5 in (3, 5], 5 in (4, 6], ..., and primes 73, 79, 83 and 89 are in (71, 91] (see Corollary 1 in the paper by Ya-Ping Lu attached in the links section). - Ya-Ping Lu, Feb 21 2021

Crossrefs

Complement of A095116.

Programs

  • Haskell
    a095117 n = a000720 n + toInteger n  -- Reinhard Zumkeller, Apr 17 2012
    
  • Maple
    with(numtheory): seq(n+pi(n),n=1..90); # Emeric Deutsch, May 02 2007
  • Mathematica
    Table[ PrimePi@n + n, {n, 0, 71}] (* Robert G. Wilson v, Apr 22 2007 *)
  • PARI
    a(n) = n + primepi(n); \\ Michel Marcus, Feb 21 2021
    
  • Python
    from sympy import primepi
    def a(n): return primepi(n) + n
    print([a(n) for n in range(72)]) # Michael S. Branicky, Feb 21 2021

Formula

a(0) = 0; for n>0, a(n) = a(n-1) + (if n is prime then 2, else 1). - Robert G. Wilson v, Apr 22 2007; corrected by David James Sycamore, Aug 16 2018

Extensions

Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar

A181642 Minimal sequence whose forwards van Eck transform is the sequence of prime numbers.

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 4, 0, 5, 6, 2, 7, 8, 9, 10, 1, 11, 12, 3, 13, 14, 15, 16, 4, 17, 18, 0, 19, 20, 21, 22, 5, 23, 24, 25, 26, 27, 28, 6, 29, 30, 2, 31, 32, 33, 34, 35, 36, 7, 37, 38, 39, 40, 8, 41, 42, 9, 43, 44, 45, 46, 10, 47, 48, 49, 50, 51, 52, 1, 53, 54
Offset: 1

Views

Author

Keywords

Comments

At each step, the minimum available integer is used.
From Rémy Sigrist, Aug 12 2017: (Start)
a(n)=0 iff n belongs to A074271.
a(n)=1 iff n > 1 and n belongs to A259408.
For any k > 0, A064427(k) = least n such that a(n) = k-1.
(End)

Examples

			a(1)=0. Next 0 is at distance 2 (1st prime): a(3)=0.
a(2)=1. Next 1 is at distance 3 (2nd prime): a(5)=1.
a(3)=0. Next 0 is at distance 5 (3rd prime): a(8)=0.
For a(4), we can use neither 0 (distance 1 from previous 0 would lead to an incongruence) nor 1 (distance 1 from subsequent 1 would lead to another incongruence). Therefore we must use 2.
Next 2 must be at distance 7 (4th prime): a(11)=2. And so on.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local i,k,n,t,x; x:=array(1..h); for k from 1 to h do x[k]:=-1; od; x[1]:=0; i:=0; t:=0;for n from 1 to q do if isprime(n) then  i:=i+1; if x[i]>-1 then x[i+n]:=x[i]; else t:=t+1; x[i]:=t; x[i+n]:=x[i]; fi; fi; od; seq(x[k],k=1..79); end: P(400,500);
  • PARI
    a = vector(71, i, -1); u = 0; for (n=1, #a, if (a[n]<0, o = n; while (o <= #a, a[o] = u; o += prime(o)); u++); print1 (a[n] ", ")) \\ Rémy Sigrist, Aug 12 2017

Extensions

More terms from Rémy Sigrist, Aug 12 2017
Showing 1-3 of 3 results.