OFFSET
1,3
COMMENTS
a(50)= 10718757, can you find a(100)?
FORMULA
a(n) = A097638(n) - 10^(n-1).
EXAMPLE
a(4)=300 because 10(10^3+300)+ 1, 10(10^3+300)+ 3, 10(10^3+300)+ 7 and 10(10^3+300)+1, are primes and 300 is the smallest number with this property.
MATHEMATICA
a[n_]:=(For[m=0, !(PrimeQ[10^n+10m+1]&&PrimeQ[10^n+10m+3]&&PrimeQ[ 10^n+10m+7]&&PrimeQ[10^n+10m+9]), m++ ]; m); Table[a[n], {n, 43}]
Table[Module[{m=0, s=10^n}, While[AnyTrue[10(s+m)+{1, 3, 7, 9}, CompositeQ], m++]; m], {n, 0, 35}] (* Harvey P. Dale, Sep 19 2022 *)
PROG
(PARI) isok(m, n) = my(s=10^(n-1)+ m); ispseudoprime(10*s+1) && ispseudoprime(10*s+3) && ispseudoprime(10*s+7) && ispseudoprime(10*s+9);
a(n) = my(m=0); while (!isok(m, n), m++); m; \\ Michel Marcus, Aug 09 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Farideh Firoozbakht, Aug 18 2004
STATUS
approved