OFFSET
0,1
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
EXAMPLE
a(12345) = 532, since 12345 has 5 total digits, 3 odd digits and 2 even digits.
MATHEMATICA
PROG
(Python)
def a(n): # T0E
s = str(n)
e = sum(1 for c in s if c in "02468")
return int(str(len(s)) + str(len(s)-e) + str(e))
print([a(n) for n in range(55)]) # Michael S. Branicky, Jan 13 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo Xausa, Jan 03 2026
STATUS
approved
