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.

A030998 Write n in base 7 and juxtapose.

This page as a plain text file.
%I A030998 #38 Sep 08 2022 08:44:50
%S A030998 0,1,2,3,4,5,6,1,0,1,1,1,2,1,3,1,4,1,5,1,6,2,0,2,1,2,2,2,3,2,4,2,5,2,
%T A030998 6,3,0,3,1,3,2,3,3,3,4,3,5,3,6,4,0,4,1,4,2,4,3,4,4,4,5,4,6,5,0,5,1,5,
%U A030998 2,5,3,5,4,5,5,5,6,6,0,6,1,6,2,6,3,6,4,6,5,6,6
%N A030998 Write n in base 7 and juxtapose.
%C A030998 An irregular table in which the n-th row lists the base-7 digits of n. - _Jason Kimberley_, Dec 07 2012
%C A030998 The base-7 Champernowne constant: it is normal in base 7. - _Jason Kimberley_, Dec 07 2012
%t A030998 Flatten[IntegerDigits[#,7]&/@Range[0,60]]  (* _Harvey P. Dale_, Mar 04 2011 *)
%t A030998 almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 7] &, 105, 0] (* _Robert G. Wilson v_, Jun 29 2014 *)
%o A030998 (Magma) [0]cat &cat[Reverse(IntegerToSequence(n,7)):n in[1..31]]; // _Jason Kimberley_, Dec 07 2012
%o A030998 (Python)
%o A030998 from itertools import count, chain, islice
%o A030998 from sympy.ntheory.factor_ import digits
%o A030998 def A030998_gen(): return chain.from_iterable(digits(m, 7)[1:] for m in count(0))
%o A030998 A030998_list = list(islice(A030998_gen(), 30)) # _Chai Wah Wu_, Jan 07 2022
%Y A030998 Tables in which the n-th row lists the base b digits of n: A030190 and A030302 (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), this sequence (b=7), A031035 and A054634 (b=8), A031076 (b=9), A007376 and A033307 (b=10). - _Jason Kimberley_, Dec 06 2012
%Y A030998 Cf. A007093.
%K A030998 nonn,base,cons,easy,tabf
%O A030998 0,3
%A A030998 _Clark Kimberling_