%I #9 Jun 18 2021 12:19:19
%S 531,541,1053,1054,2571,3051,3061,3071,3105,3106,3107,3157,3551,3561,
%T 3571,3581,3591,4051,4061,4071,4081,4091,4105,4106,4107,4108,4109,
%U 4155,4156,4157,4158,4159,4551,4561,4571,4581,4591,5031,5041,5103,5104,5128,5129,5153,5154
%N Numbers k such that k, 2k, 3k, 4k all contain digit 1.
%e The first four multiples of 531 are 531, 1062, 1593, and 2124. All of them contain digit 1.
%t Select[Range[10000], Length[ Position[IntegerDigits[#], 1]] > 0 && Length[ Position[IntegerDigits[2 #], 1]] > 0 && Length[ Position[IntegerDigits[3 #], 1]] > 0 && Length[ Position[IntegerDigits[4 #], 1]] > 0 &]
%o (Python)
%o def ok(n): return all('1' in str(k*n) for k in [1, 2, 3, 4])
%o print(list(filter(ok, range(5155)))) # _Michael S. Branicky_, Jun 17 2021
%Y Cf. A011531.
%K nonn,base
%O 1,1
%A _Tanya Khovanova_, Jun 17 2021
|