login
Numbers whose base 10 digits are a subset of {0, 8}.
11

%I #25 Feb 09 2020 02:42:10

%S 0,8,80,88,800,808,880,888,8000,8008,8080,8088,8800,8808,8880,8888,

%T 80000,80008,80080,80088,80800,80808,80880,80888,88000,88008,88080,

%U 88088,88800,88808,88880,88888,800000,800008,800080,800088,800800,800808,800880,800888

%N Numbers whose base 10 digits are a subset of {0, 8}.

%H Reinhard Zumkeller, <a href="/A204095/b204095.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = 8 * A007088(n).

%p f:= proc(n) local L; L:= convert(n,base,2); add(8*L[i]*10^(i-1),i=1..nops(L)) end proc:

%p seq(f(n),n=0..100); # _Robert Israel_, Jul 28 2014

%t Table[8 FromDigits[IntegerDigits[n, 2]], {n, 0, 39}] (* _Alonso del Arte_, Jan 10 2012 *)

%o (Haskell)

%o a204095 n = a204095_list !! n

%o a204095_list = map (* 8) a007088_list

%o (PARI) a(n)=8*subst(Pol(binary(n)), x, 10);

%o for(n=0, 20, print1(a(n), ", ")) \\ _Felix Fröhlich_, Jul 26 2014

%Y Cf. A078247, A169965, A169966, A169967, A169964, A204093, A204094, A097256.

%K nonn,base

%O 0,2

%A _Reinhard Zumkeller_, Jan 10 2012

%E Definition corrected by _M. F. Hasler_, Feb 08 2020