login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A133445
Write numbers in ternary under each other (right justified), read diagonals in SW-NE direction, sum digits.
0
0, 1, 3, 1, 2, 4, 2, 4, 3, 1, 2, 4, 2, 3, 5, 3, 5, 4, 2, 3, 5, 3, 4, 6, 5, 4, 3, 1, 2, 4, 2, 3, 5, 3, 5, 4, 2, 3, 5, 3, 4, 6, 4, 6, 5, 3, 4, 6, 4, 5, 7, 6, 5, 4, 2, 3, 5, 3, 4, 6, 4, 6, 5, 3, 4, 6, 4, 5, 7, 5, 7, 6, 4, 5, 7, 5, 6, 9, 5, 4, 3, 1, 2, 4, 2, 3, 5, 3, 5, 4, 2
OFFSET
1,3
COMMENTS
The digit sum of A102370 "sloping binary numbers" equals A089400. What about "sloping numbers" and their digit sums in other bases?
EXAMPLE
Numbers written in ternary:
0
1
2
10
11
12
20
21
22
100
101
102
.....
The NW-SE diagonals are:
0
1
12
10
11
22
20
121
102
......
giving 0, 1, 3, 1, 2, 4, 2, 4, 3, 1, 2, 4, ...
PROG
(PARI) lista(nn) = {my(v = vector(nn), nb); for (n=1, nn, v[n] = digits(n-1, 3); nb = #v[n]; ); for (n=1, nn, if (#v[n] < nb, v[n] = concat(vector(nb-#v[n]), v[n])); ); my(list = List()); for (n=nb, nn, my(s=0, pos=1); forstep(k=n, n-nb+1, -1, s += (v[k])[pos]; pos++; ); listput(list, s); ); Vec(list); } \\ Michel Marcus, Mar 16 2022
CROSSREFS
Cf. A102370.
Sequence in context: A201673 A343764 A117905 * A139457 A209301 A049992
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Dec 22 2007
EXTENSIONS
New name using formula and more terms from Michel Marcus, Mar 16 2022
STATUS
approved