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.

A043281 Maximal run length in base-7 representation of n.

This page as a plain text file.
%I A043281 #24 Sep 22 2023 01:06:49
%S A043281 1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,
%T A043281 1,1,1,1,1,2,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,2,3,2,2,2,2,2,1,1,2,1,1,1,
%U A043281 1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1
%N A043281 Maximal run length in base-7 representation of n.
%H A043281 Winston de Greef, <a href="/A043281/b043281.txt">Table of n, a(n) for n = 1..10000</a>
%t A043281 Max[Length/@Split[IntegerDigits[#,7]]]&/@Range[100] (* _Harvey P. Dale_, Mar 30 2016 *)
%o A043281 (PARI) A043281(n, b=7)={my(m,c=1); while(n>0, n%b==(n\=b)%b&&c++&&next; m=max(m, c); c=1); m} \\ _M. F. Hasler_, Jul 23 2013
%o A043281 (Python)
%o A043281 from itertools import groupby
%o A043281 from sympy.ntheory.factor_ import digits
%o A043281 def A043281(n): return max(len(list(g)) for k, g in groupby(digits(n,7)[1:])) # _Chai Wah Wu_, Mar 09 2023
%Y A043281 Cf. A007093 (base 7).
%Y A043281 Cf. A043276-A043290 for base-2 to base-16 analogs.
%K A043281 nonn,base
%O A043281 1,8
%A A043281 _Clark Kimberling_