Displaying 1-10 of 18 results found.
Sum of digits of n in fractional base 5/4.
+10
1
0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 13, 14, 15, 16, 17, 16, 17, 18, 19, 20, 14, 15, 16, 17, 18, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 17, 18, 19, 20, 21, 18, 19, 20, 21
COMMENTS
The base 5/4 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 5/4 the number 7 is represented by 42 and so a(7)=4+2=6.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(5, 4, y) for y in [0..200]]
(PARI) a(n) = my(ret=0, r); while(n, [n, r]=divrem(n, 5); ret+=r; n<<=2); ret; \\ Kevin Ryde, Aug 11 2023
Sum of digits of n written in fractional base 5/2.
+10
1
0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 4, 5, 6, 7, 8, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 5, 6, 7, 8, 9, 7, 8, 9, 10, 11, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 7, 8, 9, 10, 11, 6, 7, 8, 9, 10, 8, 9
COMMENTS
The base 5/2 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 5/2 the number 7 is represented by 22 and so a(7)=2+2=4.
MAPLE
a:= proc(n) `if`(n<1, 0, irem(n, 5, 'q')+a(2*q)) end:
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(5, 2, y) for y in [0..200]]
Sum of digits of n written in fractional base 7/3.
+10
1
0, 1, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 11, 12, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 15, 16, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 16, 17
COMMENTS
The base 7/3 expansion is unique, and thus the sum of digits function is well-defined.
EXAMPLE
In base 7/3 the number 7 is represented by 30 and so a(7) = 3 + 0 = 3.
MAPLE
a:= proc(n) `if`(n<1, 0, irem(n, 7, 'q')+a(3*q)) end:
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(7, 3, y) for y in [0..200]]
Sum of digits of n written in fractional base 8/7.
+10
0
0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 18, 19, 20, 18, 19, 20, 21, 22, 23, 24, 25, 22, 23, 24, 25, 26, 27, 28, 29, 25, 26, 27, 28, 29, 30, 31, 32, 27, 28, 29, 30, 31, 32, 33, 34, 28, 29, 30, 31, 32, 33, 34, 35, 28, 29, 30, 31
COMMENTS
The base 8/7 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 8/7 the number 14 is represented by 76 and so a(14) = 7 + 6 = 13.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(8, 7, w) for w in [0..200]]
Sum of digits of n in fractional base 7/6.
+10
0
0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 16, 17, 15, 16, 17, 18, 19, 20, 21, 18, 19, 20, 21, 22, 23, 24, 20, 21, 22, 23, 24, 25, 26, 21, 22, 23, 24, 25, 26, 27, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 26, 27, 28, 29, 30
COMMENTS
The base 7/6 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 7/6 the number 7 is represented by 60 and so a(7)=6+0=6.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(7, 6, y) for y in [0..200]]
Sum of digits of n written in fractional base 9/8.
+10
0
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 15, 16, 17, 18, 19, 20, 21, 22, 23, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 27, 28, 29, 30, 31, 32, 33, 34, 30, 31, 32, 33, 34, 35, 36, 37, 38, 33, 34, 35, 36, 37, 38, 39, 40, 41, 35, 36, 37, 38, 39
COMMENTS
The base 9/8 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 9/8 the number 16 is represented by 87 and so a(16) = 8 + 7 = 15.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(9, 8, i) for i in [0..100]]
Sum of digits of n written in fractional base 10/9.
+10
0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 39, 40, 41, 42, 43, 44, 45, 46
COMMENTS
The base 10/9 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 10/9 the number 14 is represented by 94 and so a(14) = 9 + 4 = 13.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(10, 9, w) for w in [0..200]]
Sum of digits of n written in fractional base 7/2.
+10
0
0, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 11, 7, 8, 9, 10, 11, 12, 13, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 12, 8, 9, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 15, 16, 7
COMMENTS
The base 7/2 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 7/2 the number 14 is represented by 40 and so a(14) = 4 + 0 = 4.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(7, 2, w) for w in [0..200]]
Sum of digits of n written in fractional base 5/3.
+10
0
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
COMMENTS
The base 5/3 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 5/3 the number 7 is represented by 32 and so a(7)=3+2=5.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(5, 3, y) for y in [0..200]]
Sum of digits of n written in fractional base 9/2.
+10
0
0, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 6, 7, 8, 9, 10, 11, 12, 13, 14, 8, 9, 10, 11, 12, 13, 14, 15, 16, 3, 4, 5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11, 12, 13, 7, 8, 9, 10, 11, 12, 13, 14, 15, 9, 10, 11, 12
COMMENTS
The base 9/2 expansion is unique and thus the sum of digits function is well-defined.
EXAMPLE
In base 9/2 the number 19 is represented by 41 and so a(19) = 4 + 1 = 5.
PROG
(Sage) # uses [basepqsum from A245355]
[basepqsum(9, 2, i) for i in [0..100]]
Search completed in 0.007 seconds
|