login
A242367
Numbers whose parity matches only their least significant decimal digit.
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 110, 112, 114, 116, 118, 130, 132, 134, 136, 138
OFFSET
1,2
COMMENTS
There are 9*5^(n-1) n-digit terms, hence a(n) << n^k with k = log 5/log 10 = 0.69897.... - Charles R Greathouse IV, May 12 2014
LINKS
EXAMPLE
100 is not in the sequence since 100 is even but has 2 even digits (both the second and third digits).
998 is in the sequence since 998 is even and the only even digit is the final digit.
MAPLE
N:= 3: # for terms of up to N digits
fodd:= proc(t) local i; seq(10*t+i, i=1..9, 2) end proc:
feven:= proc(t) local i; seq(10*t+i, i=0..8, 2) end proc:
feven(0):= (2, 4, 6, 8):
A[0]:= [0]:
B[0]:= [0]:
for d from 1 to N-1 do
A[d]:= map(feven, A[d-1]);
B[d]:= map(fodd, B[d-1]);
od:
R:= NULL:
for i from 0 to N-1 do
R:= R, op(map(fodd, A[i])),
op(map(feven, B[i]))
od:
sort([R]); # Robert Israel, Sep 09 2024
PROG
(Python)
def ok(n): return set(str(n)[:-1]) & set(["02468", "13579"][n&1]) == set()
print([k for k in range(1, 140) if ok(k)]) # Michael S. Branicky, Sep 09 2024
CROSSREFS
Sequence in context: A271168 A292514 A030141 * A355596 A246077 A064915
KEYWORD
nonn,base,look
AUTHOR
J. Lowell, May 12 2014
STATUS
approved