OFFSET
1,2
COMMENTS
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.
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.
Largest number of a sieve <= last consolidated remainder.
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.
EXAMPLE
n = 113
p_1 = 2, no occurrence of 2 in 113
p_2 = 3, 1 occurrence of 3 in 113, erase 3, remains 11
p_3 = 5, no occurrence of 5 in 11
p_4 = 7, no occurrence of 7 in 11
p_5 = 11, 1 occurrence of 11 in 11, no remainder
number 113 disappears and is not a member of the seq.
n = 114
p_1 = 2, no occurrence of 2 in 114
p_2 = 3, no occurrence of 3 in 114
p_3 = 5, no occurrence of 5 in 114
p_4 = 7, no occurrence of 7 in 114
p_5 = 11, 1 occurrence of 11 in 114, erase 11, remains 4
number 4 is a member of the seq.
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Sep 01 2018
STATUS
approved