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.

A065310 Number of occurrences of n-th prime in A065308, where A065308(j) = prime(j - pi(j)).

Original entry on oeis.org

3, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Comments

Seems identical to A054546. Each odd prime arises once or twice!?
First differences of A018252 (positive nonprime numbers). Including 0 gives A054546. Removing 1 gives A073783. - Gus Wiseman, Sep 15 2024

Crossrefs

For twin 2's see A169643.
Positions of 1's are A375926, complement A014689 (except first term).
Other families of numbers and their first-differences:
For prime numbers (A000040) we have A001223.
For composite numbers (A002808) we have A073783.
For nonprime numbers (A018252) we have A065310 (this).
For perfect powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
For squarefree numbers (A005117) we have A076259.
For nonsquarefree numbers (A013929) we have A078147.
For prime-powers inclusive (A000961) we have A057820.
For prime-powers exclusive (A246655) we have A057820(>1).
For non-prime-powers inclusive (A024619) we have A375735.
For non-prime-powers exclusive (A361102) we have A375708.

Programs

  • Mathematica
    t=Table[Prime[w-PrimePi[w]], {w, a, b}] Table[Count[t, Prime[n]], {n, c, d}]
    Differences[Select[Range[100],!PrimeQ[#]&]] (* Gus Wiseman, Sep 15 2024 *)
  • PARI
    { p=1; f=2; m=1; for (n=1, 1000, a=0; p=nextprime(p + 1); while (p==f, a++; m++; f=prime(m - primepi(m))); write("b065310.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 16 2009

A065311 Primes which occur exactly twice in the sequence of a(n) = prime(n) - prime(n - pi(n)) = A065308(n).

Original entry on oeis.org

3, 5, 13, 17, 29, 31, 43, 67, 71, 97, 107, 109, 131, 157, 181, 191, 223, 233, 239, 269, 281, 313, 359, 379, 383, 401, 409, 431, 503, 523, 569, 571, 619, 631, 659, 691, 719, 751, 787, 797, 857, 859, 881, 883, 971, 1039, 1061, 1063, 1091, 1117, 1123, 1201
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Comments

In A065308, each odd prime seems to appear once or twice.

Crossrefs

Programs

  • Mathematica
    Most@ Select[Tally@ Array[Prime[# - PrimePi@ #] &, 300], Last@ # == 2 &][[All, 1]] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    { n=0; p=1; f=2; m=1; for (i=1, 10^9, a=0; p=nextprime(p + 1); while (p==f, a++; m++; f=prime(m - primepi(m))); if (a==2, write("b065311.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 16 2009

A065312 Primes which occur exactly once in A065308 (prime(n - pi(n))).

Original entry on oeis.org

7, 11, 19, 23, 37, 41, 47, 53, 59, 61, 73, 79, 83, 89, 101, 103, 113, 127, 137, 139, 149, 151, 163, 167, 173, 179, 193, 197, 199, 211, 227, 229, 241, 251, 257, 263, 271, 277, 283, 293, 307, 311, 317, 331, 337, 347, 349, 353, 367, 373, 389, 397, 419, 421, 433
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Comments

In A065308 each odd prime seems to appear once or twice. Prime 2 arises there 3 times.

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Prime[# - PrimePi[#]] &, 120]}, Most@ Select[Split[s], Length@ # == 1 &][[All, 1]] ] (* Michael De Vlieger, Jun 19 2018 *)
  • PARI
    { n=0; p=1; f=2; m=1; for (i=1, 10^9, a=0; p=nextprime(p + 1); while (p==f, a++; m++; f=prime(m - primepi(m))); if (a==1, write("b065312.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 16 2009

A065309 a(n) = prime(n) - prime(n - pi(n)).

Original entry on oeis.org

0, 1, 3, 4, 8, 8, 12, 12, 12, 16, 18, 20, 24, 24, 24, 24, 30, 30, 36, 34, 32, 36, 40, 42, 44, 42, 42, 40, 42, 42, 56, 58, 58, 56, 60, 54, 60, 62, 64, 66, 72, 72, 82, 80, 70, 68, 80, 86, 88, 80, 82, 82, 84, 88, 90, 90, 90, 90, 96, 90, 92, 100, 110, 112, 102, 94, 108, 110, 118
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Examples

			n=100, prime(100)=541, prime(100 - Pi(100)) = p(75), p(100) - p(75) = 541 - 379 = 162 = a(100).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[n]-Prime[n-PrimePi[n]],{n,70}] (* Harvey P. Dale, Apr 23 2016 *)
  • PARI
    a(n) = { prime(n) - prime(n - primepi(n)) } \\ Harry J. Smith, Oct 16 2009

Formula

a(n) = A000040(n) - A000040(n - A000720(n)).
Showing 1-4 of 4 results.