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.

A135732 Distances to next prime associated with A135731.

Original entry on oeis.org

2, 1, 3, 1, 3, 1, 3, 5, 1, 5, 3, 1, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 1, 3, 13, 3, 5, 1, 9, 1, 5, 5, 3, 5, 5, 1, 9, 1, 3, 1, 11, 11, 3, 1, 3, 5, 1, 9, 5, 5, 5, 1, 5, 3, 1, 9, 13, 3, 1, 3, 13, 5, 9, 1, 3, 5, 7, 5, 5, 3, 5, 7, 3, 7, 9, 1, 9, 1, 5, 3, 5, 7, 3, 1, 3, 11, 7, 3, 7, 3, 5, 11
Offset: 1

Views

Author

Enoch Haga, Nov 26 2007

Keywords

Comments

Essentially the same as A046933. [From R. J. Mathar, Oct 28 2008]

Examples

			a(2)=3 because when n=8 (8 is next n after prime 7), next prime is 11 and distance is 3
		

Crossrefs

Cf. A135731.

Formula

Beginning with prime=2, the first n after 2 is 3 and from n=3 to next prime >n is 5, with distance from 3 to 5=2. Next n after prime=5 is 6, so that distance to next prime 7 = 1.

A175216 The first nonprimes after the primes.

Original entry on oeis.org

4, 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
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Comments

Essentially the same as A135731, A055670, A028815 and A008864. [R. J. Mathar, Mar 13 2010]

Crossrefs

Programs

  • Magma
    [n eq 1 select 4 else NthPrime(n) +1: n in [1..100]]; // G. C. Greubel, Aug 06 2024
    
  • Mathematica
    Table[Prime[n] +1 +Boole[n==1], {n,100}] (* G. C. Greubel, Aug 06 2024 *)
  • SageMath
    def A175216(n): return nth_prime(n) +1 +int(n==1)
    [A175216(n) for n in range(1,101)] # G. C. Greubel, Aug 06 2024

Formula

a(1) = 4, for n >= 2, a(n) = A008864(n) = A000040(n) + 1.

A299763 a(n) = 1 + A182986(n).

Original entry on oeis.org

1, 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

Omar E. Pol, Mar 14 2018

Keywords

Comments

Are these the indices of the rows of A299762 where there is a record?

Crossrefs

First differences are in A054541.
Essentially the same as A008864, A028815, A055670, A135731, A175216.

Programs

Formula

a(n) = A028815(n-1) - [n=1].
a(n) = A008864(n-1) for n >= 2, with a(1) = 1.

A122825 a(n) = n + number of previous prime terms, a(1) = 1.

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 39, 40, 41, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 63, 64, 65, 66, 67, 69, 70, 71, 73, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94
Offset: 1

Views

Author

Zak Seidov, Oct 23 2006

Keywords

Comments

Or, a(1)=1; a(n)=a(n-1) + d: if a(n-1) is prime then d=2 otherwise d=1.

Crossrefs

Cf. A135731 (complement).

Programs

  • Mathematica
    s={1};p=0;Do[b=n+p;AppendTo[s,b];If[PrimeQ[b],p++ ],{n,2,130}];s
  • PARI
    lista(nn) = {print1(a=1, ", "); nbp = 0; for (n=2, nn, newn = nbp + n; print1(newn, ", "); nbp += isprime(newn););} \\ Michel Marcus, Jul 31 2017
Showing 1-4 of 4 results.