login
A308479
Least k such that k*n and (k+1)*n fail to have a common nonzero digit, or 0 if this property never occurs.
3
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 3, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 2, 3, 1, 1, 1, 1, 1, 8, 1, 1, 2, 1, 1, 3, 1, 11, 1, 21, 1, 1, 1, 2, 5, 3, 5, 0, 1, 1, 2, 1, 1, 3
OFFSET
1,12
COMMENTS
a(n) = 0 for the members of A308466.
LINKS
FORMULA
If a(n) = k, then a(10*n) = k.
EXAMPLE
a(3) = 1 since 1*3 and 2*3 have no digit in common;
a(12) = 2 since 1*12 and 2*12 have the digit 2 in common, but 2*12 and 3*12 have no nonzero digit in common, thus a(12) = 2;
a(25) = 3 since 1*25 and 2*25 have the digit 5 in common, 2*25 and 3*25 have the digit 5 in common, but 3*25 and 4*25 have no nonzero digit in common; etc.
MATHEMATICA
a = Compile[{{n, _Integer}}, Module[{k = 1, id1 = DeleteCases[ IntegerDigits[ n], 0], id2 = DeleteCases[ IntegerDigits[ 2n], 0]}, While[k < 1001 && Intersection[id1, id2] != {}, id1 = id2; k++; id2 = DeleteCases[ Union[ IntegerDigits[(k + 1) n]], 0]]; If[k == 1001, 0, k]]]; Array[a, 198]
CROSSREFS
Cf. A308466.
Sequence in context: A330751 A327407 A290104 * A031280 A134870 A031286
KEYWORD
nonn,base
AUTHOR
David Radcliffe, Daniel Griller, and Robert G. Wilson v, May 29 2019
STATUS
approved