A178544 a(n) are such that n or one of its substrings is divisible by every integer from 1 to a(n).
1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 3, 2, 3, 4, 2, 3, 3, 2, 3, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 2, 4, 4, 2, 5, 4, 2, 4, 4, 2, 1, 2, 1, 6, 1, 8, 1, 2, 1, 6, 3, 3, 3, 4, 3, 3, 3, 4, 3, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 4, 2, 4, 4, 2, 4, 4, 2, 4, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 2, 3, 3, 2, 3
Offset: 1
Examples
a(56)=8 because divisors of 56 are d1={1,2,4,7,8,14,28,56}, divisors of 5 are d2={1, 5}, divisors of 6 are d3={1,2,3,6}, and union of d1, d2, d3 gives 8 subsequent integers 1..8 (14,28,.. not counted).
Crossrefs
Programs
-
Mathematica
Table[id=IntegerDigits[n]; FLA=Flatten[Table[Partition[id, k, 1], {k,Length[id]}], 1]; fd = Complement[Union[FromDigits /@ FLA], {0}]; dv=Union[Flatten[Divisors /@ fd]]; Complement[Range[100], dv][[1]]-1, {n,10^3}]
Comments