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.

A190592 Maximal digit in base-3 expansion of n.

This page as a plain text file.
%I A190592 #27 Jul 09 2025 04:33:06
%S A190592 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,
%T A190592 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,
%U A190592 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
%N A190592 Maximal digit in base-3 expansion of n.
%H A190592 Robert Israel, <a href="/A190592/b190592.txt">Table of n, a(n) for n = 0..10000</a>
%F A190592 a(n) = 2 if n == 2 (mod 3), a(1)=1, otherwise a(n) = a(floor(n/3)). - _Robert Israel_, Aug 11 2017
%F A190592 a(n) = A054055(A007089(n)). - _Felix Fröhlich_, Aug 13 2017
%p A190592 [seq(max(convert(n,base,3)),n=0..120)];
%t A190592 Join[{0}, gl[n_] := Module[{idn = IntegerDigits[n, 3]}, Max[idn]]; Array[gl,100]] (* _Vincenzo Librandi_, Aug 12 2017 *)
%o A190592 (PARI) a(n) = if (n==0, 0, vecmax(digits(n, 3))); \\ _Michel Marcus_, Aug 12 2017
%Y A190592 Cf. A007089, A054055, A037897.
%K A190592 nonn,base
%O A190592 0,3
%A A190592 _N. J. A. Sloane_, May 13 2011, based on a suggestion from _Marc LeBrun_