OFFSET
1,1
COMMENTS
The prime terms are in A051362.
The number of terms < 10^n: 0, 16, 43, 101, 159, 267, 350, 476, 582, 751, ..., . - Robert G. Wilson v, Oct 09 2014
Includes 10*x+1 for x in A004022. - Robert Israel, Jan 14 2016
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..752 (first 485 terms from T. D. Noe)
EXAMPLE
1379 is in the sequence since 379, 179, 139 & 137 are all primes. - Robert G. Wilson v, Oct 07 2014
MATHEMATICA
fQ[n_] := Union[ PrimeQ[ Table[ Quotient[n, 10^k]*10^(k - 1) + Mod[n, 10^(k - 1)], {k, 1 + Floor@ Log10@ n}] ]] == {True}; Select[ Range@ 1675, fQ] (* Robert G. Wilson v, Oct 07 2014 *)
ddpnQ[n_]:=With[{id=IntegerDigits[n]}, AllTrue[Table[FromDigits[Drop[id, {i}]], {i, Length[id]}], PrimeQ]]; Select[Range[2000], ddpnQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 12 2017 *)
PROG
(PARI) isok(n) = {d = digits(n); for (i=1, #d, nd = []; for (k=1, #d, if (k != i, nd = concat(nd, d[k])); ); if (! isprime(subst(Pol(nd), x, 10)), return (0)); ); return (1); } \\ Michel Marcus, Jul 17 2014
(PARI) DroppingAnyDigitGivesAPrime(N, b) = {
\\ Property-testing function; returns 1 if true for N, 0 otherwise
\\ Works with any base b. Here usable with b=10.
my(k=b, m); if(N<b, return(0));
while(N>=(k\b), m=(N\k)*(k\b)+(N%(k\b));
if ((m<2)||(!isprime(m)), return(0)); k*=b);
return(1);
} \\ Stanislav Sykora, Jan 14 2016
(Python) from sympy import isprime
def is_A034895(n):
....s = str(n)
....return n>9 and all(isprime(int(s[:i]+s[i+1:])) for i in range(len(s)))
# David Radcliffe, Dec 11 2017
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
STATUS
approved