login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034895 Dropping any digit gives a prime number. 7
22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 111, 113, 117, 119, 131, 137, 171, 173, 179, 197, 311, 317, 371, 411, 413, 417, 431, 437, 471, 473, 611, 617, 671, 711, 713, 719, 731, 1013, 1031, 1037, 1073, 1079, 1097, 1379, 1397, 1499, 1673 (list; graph; refs; listen; history; text; internal format)
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

MAPLE

P:=proc(q) local d, k, n;

for n from 1 to q do d:=ilog10(n); for k from 0 to d do

if not isprime(trunc(n/10^(k+1))*10^k+(n mod 10^k)) then break; fi;

od; if k=d+1 then print(n); fi; od; end: P(10^4); # Paolo P. Lava, Jul 16 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

CROSSREFS

Cf. A267413.

Sequence in context: A004511 A236404 A058814 * A106582 A092619 A092624

Adjacent sequences:  A034892 A034893 A034894 * A034896 A034897 A034898

KEYWORD

nonn,base,nice

AUTHOR

Erich Friedman

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 20:39 EDT 2017. Contains 288840 sequences.