login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A096289
Sum of digits of n in bases 2 and 5.
2
0, 2, 3, 5, 5, 3, 4, 6, 5, 7, 4, 6, 6, 8, 9, 7, 5, 7, 8, 10, 6, 8, 9, 11, 10, 4, 5, 7, 7, 9, 6, 8, 5, 7, 8, 6, 6, 8, 9, 11, 6, 8, 9, 11, 11, 9, 10, 12, 10, 12, 5, 7, 7, 9, 10, 8, 7, 9, 10, 12, 8, 10, 11, 13, 9, 7, 8, 10, 10, 12, 9, 11, 10, 12, 13, 7, 7, 9, 10, 12, 6, 8, 9, 11, 11, 9, 10, 12, 11, 13
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
FORMULA
a(n) = A000120(n) + A053824(n). - Amiram Eldar, Jul 28 2023
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 06:15 EDT 2024. Contains 376097 sequences. (Running on oeis4.)