OFFSET
1,1
FORMULA
Conjecture: a(n+1)/a(n) ~ 10.
MAPLE
f:= proc(n) local j, x;
for j from ceil((sqrt(2*10^(n-1)-1)-1)/2) do
x:= j^2 + (j+1)^2;
if isprime(x) then return x fi
od
end proc:
map(f, [$1..40]); # Robert Israel, Oct 13 2024
MATHEMATICA
a[n_]:=Module[{k=1}, While[!PrimeQ[m=2k^2+2k+1]||IntegerLength[m]<n, k++]; m]; Array[a, 15]
PROG
(Python)
from math import isqrt
from itertools import count
from sympy import prime
def A376992(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 # Chai Wah Wu, Oct 13 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Oct 11 2024
STATUS
approved