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.

A259237 a(n) = least prime q such that q + prime(n) is a cube.

Original entry on oeis.org

727, 5, 3, 1721, 53, 499, 47, 197, 41, 971, 1697, 179, 23, 173, 17, 11, 5, 3, 149, 929, 439, 137, 4013, 127, 2647, 1627, 113, 109, 107, 103, 89, 1597, 79, 373, 67, 2593, 59, 53, 3929, 43, 37, 331, 809, 23, 19, 17, 5, 2521, 773, 283, 3863, 761, 271, 5581, 743, 3833
Offset: 1

Views

Author

Zak Seidov, Jun 22 2015

Keywords

Comments

Corresponding values of (a(n)+prime(n))^(1/3): 9,2,2,12,4,8,4,6,4,10,12,6,4,6,4,4,4,4,6,10,8,6,16,6,14,12,6,6,6,6,6.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,k;
      p:= ithprime(n);
      for k from ceil(p^(1/3)) do
        if isprime(k^3 - p) then return k^3 - p fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 17 2023
  • Mathematica
    Table[p=Prime[n];x=Ceiling[p^(1/3)];While[!PrimeQ[q=x^3-p],x++];q,{n,100}]
  • PARI
    a(n) = {p = prime(n); k=2; while(!ispower(p+k,3), k = nextprime(k+1)); k;} \\ Michel Marcus, Jun 22 2015