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.
%I A376907 #27 Nov 09 2024 02:37:28 %S A376907 7,19,127,1657,10267,102121,1021417,10052191,100381321,1000556719, %T A376907 10000510297,100025541019,1000011191887,10000028937841, %U A376907 100000062634561,1000001305386991,10000001240507791,100000021541868691,1000000084213608427,10000000012591553221,100000000159478313337 %N A376907 a(n) is the least n-digit cuban prime. %C A376907 a(n) - A011557(n-1) is a multiple of 3. %H A376907 Robert Israel, <a href="/A376907/b376907.txt">Table of n, a(n) for n = 1..996</a> %F A376907 Conjecture: a(n+1)/a(n) ~ 10. %p A376907 nextcuban:= proc(n) %p A376907 local k,y; %p A376907 for k from ceil((sqrt(12*n-3)-3)/6) do %p A376907 y:= (k+1)^3 - k^3; %p A376907 if isprime(y) then return y fi %p A376907 od %p A376907 end proc: %p A376907 seq(nextcuban(10^i), i = 0 .. 25); # _Robert Israel_, Nov 08 2024 %t A376907 a[n_]:=Module[{k=1},While[!PrimeQ[m=3k^2+3k+1]||IntegerLength[m]<n, k++]; m]; Array[a,15] %o A376907 (Python) %o A376907 from itertools import count %o A376907 from math import isqrt %o A376907 from sympy import isprime %o A376907 def A376907(n): %o A376907 for k in count(isqrt((((a:=10**(n-1))<<2)-1)//12)): %o A376907 m = 3*k*(k+1)+1 %o A376907 if m >= a and isprime(m): %o A376907 return m # _Chai Wah Wu_, Oct 13 2024 %Y A376907 Cf. A002407, A003215, A003617, A011557, A111251, A113478, A145203, A376933. %K A376907 nonn,base %O A376907 1,1 %A A376907 _Stefano Spezia_, Oct 08 2024