|
|
A325113
|
|
Positive integers whose decimal representation has no nonzero subsequence that is divisible by 4.
|
|
3
|
|
|
1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 35, 37, 39, 50, 51, 53, 55, 57, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 79, 90, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 111, 113, 115, 117
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
There are no digits 4 or 8.
If there is a digit 2 or 6, all previous digits must be even.
If there is a digit 0, all previous digits must be odd. (End)
|
|
LINKS
|
|
|
MAPLE
|
filter:= proc(n) local L, i;
L:= convert(n, base, 10);
if member(4, L) or member(8, L) then return false fi;
if member(0, L, i) and hastype(L[i+1..-1], even) then return false fi;
i:= ListTools:-SelectFirst(t -> t=2 or t=6, L, output=indices);
i = NULL or not hastype(L[i+1..-1], odd);
end proc:
|
|
MATHEMATICA
|
With[{k = 4}, Select[Range@ 120, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* Michael De Vlieger, Mar 31 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|