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.

Showing 1-3 of 3 results.

A190592 Maximal digit in base-3 expansion of n.

Original entry on oeis.org

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, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 13 2011, based on a suggestion from Marc LeBrun

Keywords

Crossrefs

Programs

  • Maple
    [seq(max(convert(n,base,3)),n=0..120)];
  • Mathematica
    Join[{0}, gl[n_] := Module[{idn = IntegerDigits[n, 3]}, Max[idn]]; Array[gl,100]] (* Vincenzo Librandi, Aug 12 2017 *)
  • PARI
    a(n) = if (n==0, 0, vecmax(digits(n, 3))); \\ Michel Marcus, Aug 12 2017

Formula

a(n) = 2 if n == 2 (mod 3), a(1)=1, otherwise a(n) = a(floor(n/3)). - Robert Israel, Aug 11 2017
a(n) = A054055(A007089(n)). - Felix Fröhlich, Aug 13 2017

A043530 Number of distinct base-3 digits of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 1, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2
Offset: 1

Views

Author

Keywords

Comments

a(A031944(n)) = 3; a(A154314(n)) < 3. - Reinhard Zumkeller, Jan 07 2009
Image, under the coding sending i -> 1+floor(i/3), of the fixed point, starting with 0, of the morphism 0 -> 012, 1 -> 314, 2 -> 542, 3 -> 336, 4 -> 644, 5 -> 565, 6 -> 666. - Jeffrey Shallit, May 15 2016

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[IntegerDigits[n,3]]],{n,90}] (* Harvey P. Dale, May 13 2020 *)
  • PARI
    a(n) = #vecsort(digits(n,3),,8); \\ Michel Marcus, May 16 2016

A290825 Least base-3 digit of n.

Original entry on oeis.org

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

Views

Author

Robert Israel, Aug 11 2017

Keywords

Examples

			11 = 102_3 so a(11)=0.
		

Crossrefs

Programs

  • Maple
    seq(min(convert(n,base,3)),n=0..100);
  • Mathematica
    Table[Min[IntegerDigits[n,3]],{n,0,120}] (* Harvey P. Dale, Dec 19 2017 *)
  • PARI
    a(n) = if (n==0, 0, vecmin(digits(n, 3))); \\ Michel Marcus, Aug 12 2017

Formula

a(n) = 2 if and only if n > 0 is in A024023.
a(n) = 0 if n is divisible by 3.
a(n) = min(A010872(n), a(A002264(n))).
Showing 1-3 of 3 results.