OFFSET
0,2
COMMENTS
Let n = Sum(c(k)*2^k), c(k) = 0,1, be the binary form of n, n = Sum(d(k)*5^k), d(k) = 0,1,2,3,4 the base 5 form; then a(n) = Sum(c(k)+d(k)).
a(n) mod 2 = doubled Thue-Morse sequence A095190.
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
n=13: 13=1*2^3+1*2^2+1*2^0, 1+1+1=3, 13=2*5^1+3*5^0, 2+3=5, so a(13)=3+5=8.
MATHEMATICA
a[n_] := Total[Flatten@ IntegerDigits[n, {2, 5}]]; Array[a, 100, 0] (* Amiram Eldar, Jul 28 2023 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Miklos Kristof, Peter Boros, Jun 24 2004
STATUS
approved