OFFSET
1,2
COMMENTS
The set of real numbers between 0 and 1 that contain no odd digits in their decimal expansion has Hausdorff dimension log 5 / log 10.
Integers written in base 5 and then doubled (in base 10). - Franklin T. Adams-Watters, Mar 15 2006
The carryless mod 10 "even" numbers (cf. A004529) sorted and duplicates removed. - N. J. A. Sloane, Aug 03 2010.
If n-1 is represented as a base-5 number (see A007091) according to n-1 = d(m)d(m-1)…d(3)d(2)d(1)d(0) then a(n)= Sum_{j=0..m} c(d(j))*10^j, where c(k)=0,2,4,6,8 for k=0..4. - Hieronymus Fischer, Jun 03 2012
REFERENCES
K. J. Falconer, The Geometry of Fractal Sets, Cambridge, 1985; p. 19.
LINKS
FORMULA
A045888(a(n)) = 0. - Reinhard Zumkeller, Aug 25 2009
a(n) = A179082(n) for n <= 25. - Reinhard Zumkeller, Jun 28 2010
From Hieronymus Fischer, Jun 06 2012: (Start)
a(n) = ((2*b_m(n)) mod 8 + 2)*10^m + Sum_{j=0..m-1} ((2*b_j(n)) mod 10)*10^j, where n>1, b_j(n) = floor((n-1-5^m)/5^j), m = floor(log_5(n-1)).
a(1*5^n+1) = 2*10^n.
a(2*5^n+1) = 4*10^n.
a(3*5^n+1) = 6*10^n.
a(4*5^n+1) = 8*10^n.
a(n) = 2*10^log_5(n-1) for n=5^k+1,
a(n) < 2*10^log_5(n-1), else.
a(n) > (8/9)*10^log_5(n-1) n>1.
G.f.: g(x) = (x/(1-x))*Sum_{j>=0} 10^j*x^5^j *(1-x^5^j)* (2+4x^5^j+ 6(x^2)^5^j+ 8(x^3)^5^j)/(1-x^5^(j+1)).
Also: g(x) = 2*(x/(1-x))*Sum_{j>=0} 10^j*x^5^j * (1-4x^(3*5^j)+3x^(4*5^j))/((1-x^5^j)(1-x^5^(j+1))).
Also: g(x) = 2*(x/(1-x))*(h_(5,1)(x) + h_(5,2)(x) + h_(5,3)(x) + h_(5,4)(x) - 4*h_(5,5)(x)), where h_(5,k)(x) = Sum_{j>=0} 10^j*(x^5^j)^k/(1-(x^5^j)^5). (End)
a(5*n+i-4) = 10*a(n) + 2*i for n >= 1, i=0..4. - Robert Israel, Apr 07 2016
Sum_{n>=2} 1/a(n) = A194182. - Bernard Schott, Jan 13 2022
EXAMPLE
a(1000) = 24888.
a(10^4) = 60888.
a(10^5) = 22288888.
a(10^6) = 446888888.
MAPLE
a:= proc(m) local L, i;
L:= convert(m-1, base, 5);
2*add(L[i]*10^(i-1), i=1..nops(L))
end proc:
seq(a(i), i=1..100); # Robert Israel, Apr 07 2016
MATHEMATICA
Select[Range[450], And@@EvenQ[IntegerDigits[#]]&] (* Harvey P. Dale, Jan 30 2011 *)
PROG
(Haskell)
a014263 n = a014263_list !! (n-1)
a014263_list = filter (all (`elem` "02468") . show) [0, 2..]
-- Reinhard Zumkeller, Jul 05 2011
(Magma) [n: n in [0..424] | Set(Intseq(n)) subset [0..8 by 2]]; // Bruno Berselli, Jul 19 2011
(Python)
from sympy.ntheory.digits import digits
def a(n): return int(''.join(str(2*d) for d in digits(n, 5)[1:]))
print([a(n) for n in range(58)]) # Michael S. Branicky, Jan 13 2022
(Python)
from itertools import count, islice, product
def agen(): # generator of terms
yield 0
for d in count(1):
for first in "2468":
for rest in product("02468", repeat=d-1):
yield int(first + "".join(rest))
print(list(islice(agen(), 58))) # Michael S. Branicky, Jan 13 2022
(PARI) a(n) = 2*fromdigits(digits(n-1, 5), 10); \\ Michel Marcus, Nov 04 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Examples and crossrefs added by Hieronymus Fischer, Jun 06 2012
STATUS
approved