OFFSET
1,1
MATHEMATICA
a[n_]:=(Module[{k=1}, While[!PrimeQ[m=3k^2+3k+1]||IntegerLength[m]<n, k++]; m]-10^(n-1))/3; Array[a, 15]
PROG
(Python)
from itertools import count
from math import isqrt
from sympy import isprime
def A376933(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-a)//3 # Chai Wah Wu, Oct 13 2024
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Stefano Spezia, Oct 11 2024
EXTENSIONS
a(21)-a(27) from Chai Wah Wu, Oct 13 2024
STATUS
approved