login
Terms resulting from application of a prime sieve to the digits of the decimal expansions of the positive integers.
1

%I #32 Sep 10 2018 04:53:03

%S 1,4,6,8,9,10,1,1,14,1,16,1,18,0,1,4,6,8,9,0,1,4,6,8,9,40,4,4,44,4,46,

%T 4,48,49,0,1,4,6,8,9,60,6,6,64,6,66,6,68,69,0,1,4,6,8,9,80,81,8,8,84,

%U 8,86,8,88,90,91,9,9,94,9,96,9,98,99,100,10,10,104,10,106,10,108,0,1,4

%N Terms resulting from application of a prime sieve to the digits of the decimal expansions of the positive integers.

%C Definition of sieving over the digits of k: Erase each digit 2 in the decimal expansion of k, then consolidate the remaining digits. Erase each digit 3 in what remains from the previous step, then consolidate the remaining digits. Repeat the procedure with 5, 7, ..., largest prime <= last consolidated remainder. What remains then becomes a term of the sequence. If there are no remaining digits after the procedure, this number disappears and is not a term.

%C Consolidation means the removal of all empty places at each step of the sieving process. Example: k = 1225; erasing all 2's in 1225 results in 1__5, which consolidates to 15; erasing all 3's in 15 results in 15; erasing all 5's in 15 results in 1_, which consolidates to 1. So for k = 1225 the result after sieving is 1. Example: k = 10101; erasing all 2's, ..., 97's results in 10101; erasing 101's in 10101 results in ___01, which consolidates to the last consolidated remainder 01. As there is no prime <= 01 to sieve with, the result for k = 10101 after sieving is 1.

%C Largest number of a sieve <= last consolidated remainder.

%C This sequence sieve is: {primes}. There could be other sieve definitions: {binary numbers}, {even numbers}, {odd numbers}, {triangular numbers}, predefined set of numbers like {0,3,11,27}, etc.

%e n = 113

%e p_1 = 2, no occurrence of 2 in 113

%e p_2 = 3, 1 occurrence of 3 in 113, erase 3, remains 11

%e p_3 = 5, no occurrence of 5 in 11

%e p_4 = 7, no occurrence of 7 in 11

%e p_5 = 11, 1 occurrence of 11 in 11, no remainder

%e number 113 disappears and is not a member of the seq.

%e n = 114

%e p_1 = 2, no occurrence of 2 in 114

%e p_2 = 3, no occurrence of 3 in 114

%e p_3 = 5, no occurrence of 5 in 114

%e p_4 = 7, no occurrence of 7 in 114

%e p_5 = 11, 1 occurrence of 11 in 114, erase 11, remains 4

%e number 4 is a member of the seq.

%t upto[n_] := Block[{s = ToString /@ Range[n]}, Do[s = StringReplace[s, ToString[p] -> ""], {p, Prime@ Range@ PrimePi@ n}]; ToExpression@ DeleteCases[s, ""]]; upto[115] (* _Giovanni Resta_, Sep 01 2018 *)

%Y Cf. A245770, A248831, A248804, A000027, A062115.

%K nonn,base

%O 1,2

%A _Ctibor O. Zizka_, Sep 01 2018