# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a054635 Showing 1-1 of 1 %I A054635 #49 Jun 19 2024 14:49:21 %S A054635 0,1,2,1,0,1,1,1,2,2,0,2,1,2,2,1,0,0,1,0,1,1,0,2,1,1,0,1,1,1,1,1,2,1, %T A054635 2,0,1,2,1,1,2,2,2,0,0,2,0,1,2,0,2,2,1,0,2,1,1,2,1,2,2,2,0,2,2,1,2,2, %U A054635 2,1,0,0,0,1,0,0,1,1,0,0,2,1,0,1,0,1,0,1,1,1,0,1,2,1,0,2,0,1,0,2,1 %N A054635 Champernowne sequence: write n in base 3 and juxtapose. %C A054635 Essentially the same as A003137. - _R. J. Mathar_, Aug 29 2009 %C A054635 An irregular table in which the n-th row lists the base-3 digits of n. - _Jason Kimberley_, Dec 07 2012 %C A054635 The base-3 Champernowne constant (A077771): it is normal in base 3. - _Jason Kimberley_, Dec 07 2012 %H A054635 Reinhard Zumkeller, Rows n = 0..1000 of triangle, flattened %H A054635 Eric Weisstein's World of Mathematics, Ternary Champernowne Constant %H A054635 Wikipedia, Ternary numeral system %t A054635 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[#, 3] &, 105, 0] (* _Robert G. Wilson v_, Jun 29 2014 *) %t A054635 First[RealDigits[ChampernowneNumber[3], 3, 100, 0]] (* _Paolo Xausa_, Jun 19 2024 *) %o A054635 (Magma) [0]cat &cat[Reverse(IntegerToSequence(n,3)):n in[1..31]]; // _Jason Kimberley_, Dec 07 2012 %o A054635 (Haskell) %o A054635 a054635 n k = a054635_tabf !! n !! k %o A054635 a054635_row n = a054635_tabf !! n %o A054635 a054635_tabf = map reverse a030341_tabf %o A054635 a054635_list = concat a054635_tabf %o A054635 -- _Reinhard Zumkeller_, Feb 21 2013 %o A054635 (Python) %o A054635 from sympy.ntheory.digits import digits %o A054635 def agen(limit): %o A054635 for n in range(limit): %o A054635 yield from digits(n, 3)[1:] %o A054635 print([an for an in agen(35)]) # _Michael S. Branicky_, Sep 01 2021 %Y A054635 Cf. A054637 (partial sums). %Y A054635 Cf. A081604 (row lengths), A053735 (row sums), A030341 (rows reversed), A007089, A077771. %Y A054635 Table in which the n-th row lists the base b digits of n: A030190 and A030302 (b=2), A003137 and this sequence (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), A007376 and A033307 (b=10). - _Jason Kimberley_, Dec 06 2012 %K A054635 nonn,base,cons,easy,tabf %O A054635 0,3 %A A054635 _N. J. A. Sloane_, Apr 16 2000 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE