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 A376933 #18 Mar 01 2025 16:45:01 %S A376933 2,3,9,219,89,707,7139,17397,127107,185573,170099,8513673,3730629, %T A376933 9645947,20878187,435128997,413502597,7180622897,28071202809, %U A376933 4197184407,53159437779,72827487477,408466487673,1622948986427,1009480191957,50924645281527,141362538039039 %N A376933 a(n) = (A376907(n) - 10^(n-1))/3. %t A376933 a[n_]:=(Module[{k=1}, While[!PrimeQ[m=3k^2+3k+1]||IntegerLength[m]<n, k++]; m]-10^(n-1))/3; Array[a, 15] %o A376933 (Python) %o A376933 from itertools import count %o A376933 from math import isqrt %o A376933 from sympy import isprime %o A376933 def A376933(n): %o A376933 for k in count(isqrt((((a:=10**(n-1))<<2)-1)//12)): %o A376933 m = 3*k*(k+1)+1 %o A376933 if m >= a and isprime(m): %o A376933 return (m-a)//3 # _Chai Wah Wu_, Oct 13 2024 %o A376933 (PARI) a(n) = my(m=10^(n-1), p); for(k=(sqrtint(12*m-3)-3)\6, oo, p=3*k*(k+1)+1; if(p>m&&isprime(p), return((p-m)/3))); \\ _Jinyuan Wang_, Mar 01 2025 %Y A376933 Cf. A011557, A376907. %K A376933 nonn,base %O A376933 1,1 %A A376933 _Stefano Spezia_, Oct 11 2024 %E A376933 a(21)-a(27) from _Chai Wah Wu_, Oct 13 2024