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.

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)) ); }