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.

A037897 (Greatest base 3 digit of n)-(least base 3 digit of n).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A037897 := proc(n)
        local dgs ;
        dgs := convert(n,base,3);
        max(op(dgs))-min(op(dgs)) ;
    end proc: # R. J. Mathar, Oct 19 2015
  • PARI
    A037897(n) = (vecmax(digits(n,3)) - vecmin(digits(n,3))); \\ Antti Karttunen, Aug 11 2017

Formula

a(n) = A190592(n) - A290825(n). - Antti Karttunen, Aug 12 2017

Extensions

Offset corrected by R. J. Mathar, Oct 19 2015
More terms from Antti Karttunen, Aug 11 2017