A245343 Sum of digits of n written in fractional base 5/3.
0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15
Offset: 0
Examples
In base 5/3 the number 7 is represented by 32 and so a(7) = 3+2 = 5.
Links
Programs
-
Mathematica
a[n_] := a[n] = If[n == 0, 0, a[3 * Floor[n/5]] + Mod[n, 5]]; Array[a, 100, 0] (* Amiram Eldar, Jul 30 2025 *)
-
PARI
a(n) = if(n == 0, 0, a(n\5 * 3) + n % 5); \\ Amiram Eldar, Jul 30 2025
-
Sage
# uses [basepqsum from A245355] [basepqsum(5,3,y) for y in [0..200]]
Formula
Extensions
Name corrected by Bernard Schott, Mar 18 2020
Comments