cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A133445 Write numbers in ternary under each other (right justified), read diagonals in SW-NE direction, sum digits.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Dec 22 2007

Keywords

Comments

The digit sum of A102370 "sloping binary numbers" equals A089400. What about "sloping numbers" and their digit sums in other bases?

Examples

			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, ...
		

Crossrefs

Cf. A102370.

Programs

  • 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

Extensions

New name using formula and more terms from Michel Marcus, Mar 16 2022