A343810 Numbers that contain only the digits 0,4,8. Permutable multiples of 4: numbers k such that every permutation of the digits of k is a multiple of 4.
0, 4, 8, 40, 44, 48, 80, 84, 88, 400, 404, 408, 440, 444, 448, 480, 484, 488, 800, 804, 808, 840, 844, 848, 880, 884, 888, 4000, 4004, 4008, 4040, 4044, 4048, 4080, 4084, 4088, 4400, 4404, 4408, 4440, 4444, 4448, 4480, 4484, 4488, 4800, 4804
Offset: 0
Examples
480 = 4*120, 408 = 4*102, 840 = 4*210, 804 = 4*201, 048 = 4*12, 084 = 4*21.
Programs
-
Maple
f:= proc(n) local L,i; L:= convert(n,base,3); 4*add(L[i]*10^(i-1),i=1..nops(L)) end proc: map(f, [$0..100]); # Robert Israel, Apr 30 2021
-
Mathematica
FromDigits /@ Tuples[{0, 4, 8}, 4] (* Amiram Eldar, Apr 30 2021 *)
-
PARI
a(n) = fromdigits(digits(n, 3))*4 \\ Rémy Sigrist, May 05 2021
Formula
a(n) = 4*A007089(n).
Comments