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.

A376907 a(n) is the least n-digit cuban prime.

Original entry on oeis.org

7, 19, 127, 1657, 10267, 102121, 1021417, 10052191, 100381321, 1000556719, 10000510297, 100025541019, 1000011191887, 10000028937841, 100000062634561, 1000001305386991, 10000001240507791, 100000021541868691, 1000000084213608427, 10000000012591553221, 100000000159478313337
Offset: 1

Views

Author

Stefano Spezia, Oct 08 2024

Keywords

Comments

a(n) - A011557(n-1) is a multiple of 3.

Crossrefs

Programs

  • Maple
    nextcuban:= proc(n)
      local k,y;
      for k from ceil((sqrt(12*n-3)-3)/6) do
        y:= (k+1)^3 - k^3;
        if isprime(y) then return y fi
      od
    end proc:
    seq(nextcuban(10^i), i = 0 .. 25); # Robert Israel, Nov 08 2024
  • Mathematica
    a[n_]:=Module[{k=1},While[!PrimeQ[m=3k^2+3k+1]||IntegerLength[m]
    				
  • Python
    from itertools import count
    from math import isqrt
    from sympy import isprime
    def A376907(n):
        for k in count(isqrt((((a:=10**(n-1))<<2)-1)//12)):
            m = 3*k*(k+1)+1
            if m >= a and isprime(m):
                return m # Chai Wah Wu, Oct 13 2024

Formula

Conjecture: a(n+1)/a(n) ~ 10.