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.

A065046 Numbers k such that prime(k) - pi(k) is a prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 14, 15, 16, 19, 22, 30, 38, 44, 55, 64, 79, 81, 90, 91, 93, 94, 96, 101, 113, 115, 117, 118, 121, 122, 123, 124, 125, 133, 142, 148, 163, 173, 176, 178, 182, 183, 185, 189, 190, 199, 205, 206, 208, 223, 226, 232, 239, 240, 251, 253, 255, 263
Offset: 1

Views

Author

Robert G. Wilson v, Nov 05 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[300], PrimeQ[Prime[ # ] - PrimePi[ # ]] & ]
  • PARI
    isok(m) = isprime(prime(m) - primepi(m)); \\ Harry J. Smith, Oct 04 2009

A111183 a(n) = prime(x) - pi(x) where x is the least x such that (prime(x+1) - pi(x+1)) - (prime(x) - pi(x)) = n.

Original entry on oeis.org

2, 3, 5, 15, 47, 19, 339, 80, 168, 128, 185, 196, 103, 275, 1771, 1871, 1028, 498, 3004, 851, 3641, 1087, 11845, 1613, 5402, 2404, 3182, 2889, 5225, 4190, 5461, 10585, 16958, 1280, 22444, 9357, 56241, 30129, 24857, 19006, 34461, 15852, 224417, 15401
Offset: 1

Views

Author

Cino Hilliard, Oct 22 2005

Keywords

Comments

Conjecture: a(n) exists for every n.

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1) .. a(N)
    p:= 2: m:= 0: b:= 2:V:= Vector(N): count:= 0:
    for x from 2 while count < N do
      p:= nextprime(p);
      if isprime(x) then m:= m+1 fi;
      bp:= b; b:= p-m;
      v:= b-bp;
      if v >= 1 and v <= N and V[v] = 0 then V[v]:= bp; count:= count+1 fi
    od:
    convert(V,list); # Robert Israel, Mar 16 2025
  • PARI
    a(n) = { for(x=1, oo, my(y=prime(x)-primepi(x), z=prime(x+1)-primepi(x+1)); if(z-y == n,return(y)) ); }

A064777 Numbers k such that prime(k) - pi(k) is divisible by k.

Original entry on oeis.org

1, 2, 3, 18, 42, 95, 524, 273585, 1735537, 4406057, 4406063, 4406188, 4406196, 4406341, 4406539, 4406541, 28703894, 73694240, 73694281, 73694287, 73694360, 73694363, 73694410, 3287860772, 3287860773, 3287860880, 3287860889, 3287860895, 3287860897
Offset: 1

Views

Author

Labos Elemer and Robert G. Wilson v, Oct 18 2001

Keywords

Examples

			k = 18 is a term: prime(18) = 61, pi(18) = 7, and (61-7)/18 = 54/18 = 3.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ IntegerQ[ (Prime[n] - PrimePi[n])/n ], Print[n]], {n, 1, 6*10^7} ]
    Select[Range[5000000],Divisible[Prime[#]-PrimePi[#],#]&] (* Harvey P. Dale, Aug 12 2013 *)
  • PARI
    isok(k) = ((prime(k) - primepi(k)) % k) == 0; \\ Michel Marcus, Jun 15 2021

Extensions

a(18)-a(23) from Donovan Johnson, Apr 23 2010
a(24)-a(29) from Donovan Johnson, Oct 17 2012
Showing 1-3 of 3 results.