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-2 of 2 results.

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.

A376993 a(n) = A376992(n) - 10^(n-1).

Original entry on oeis.org

4, 3, 13, 13, 513, 801, 6781, 30721, 40513, 1057513, 515313, 16728501, 78402181, 13617661, 472012281, 64846161, 5481873013, 2459693601, 116852093013, 62611784481, 1234170737761, 1565435686113, 17492477581161, 2254878102513, 16836143444113, 229959946206301
Offset: 1

Views

Author

Stefano Spezia, Oct 11 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=(Module[{k=1}, While[!PrimeQ[m=2k^2+2k+1]||IntegerLength[m]
    				
  • Python
    from math import isqrt
    from itertools import count
    from sympy import isprime
    def A376993(n):
        for k in count(isqrt(((a:=10**(n-1))<<1)-1>>2)):
            m = 2*k*(k+1)+1
            if m >= a and isprime(m):
                return m-a # Chai Wah Wu, Oct 13 2024

Extensions

a(21)-a(26) from Chai Wah Wu, Oct 13 2024
Showing 1-2 of 2 results.