A032945 Numbers k whose base-10 representation Sum_{i=0..m} d(i)*10^(m-i) has d(i)=0 for all odd i. Here m is the position of the lead digit of k.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 400, 401, 402, 403
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A126684.
Programs
-
Maple
N:= 6: # to get all terms with up to N digits A[1]:= 0: count:= 1: for d from 1 to N do dp:= ceil(d/2); for j from 10^(dp-1) to 10^dp-1 do L:= ListTools[Reverse](convert(j,base,10)); L:= ListTools[Interleave](L,[0$(d-dp)]); count:= count+1; A[count]:= add(L[i]*10^(d-i),i=1..d); od od: seq(A[i],i=1..count); # Robert Israel, Aug 31 2014
-
PARI
is(n)=!forstep(i=2,#n=digits(n),2,n[i]&&return) \\ M. F. Hasler, Dec 28 2014
-
Python
def ok(n): return str(n)[1::2].strip('0') == "" print([k for k in range(404) if ok(k)]) # Michael S. Branicky, Apr 12 2022
Extensions
Definition corrected by Franklin T. Adams-Watters, Aug 30 2014
Comments