login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054635 Champernowne sequence: write n in base 3 and juxtapose. 22
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, 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, 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 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Essentially the same as A003137. - R. J. Mathar, Aug 29 2009
An irregular table in which the n-th row lists the base-3 digits of n. - Jason Kimberley, Dec 07 2012
The base-3 Champernowne constant (A077771): it is normal in base 3. - Jason Kimberley, Dec 07 2012
LINKS
Eric Weisstein's World of Mathematics, Ternary Champernowne Constant
MATHEMATICA
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 *)
PROG
(Magma) [0]cat &cat[Reverse(IntegerToSequence(n, 3)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
(Haskell)
a054635 n k = a054635_tabf !! n !! k
a054635_row n = a054635_tabf !! n
a054635_tabf = map reverse a030341_tabf
a054635_list = concat a054635_tabf
-- Reinhard Zumkeller, Feb 21 2013
(Python)
from sympy.ntheory.digits import digits
def agen(limit):
for n in range(limit):
yield from digits(n, 3)[1:]
print([an for an in agen(35)]) # Michael S. Branicky, Sep 01 2021
CROSSREFS
Cf. A054637 (partial sums).
Cf. A081604 (row lengths), A053735 (row sums), A030341 (rows reversed), A007089, A077771.
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
Sequence in context: A024940 A324827 A205217 * A003137 A353048 A006842
KEYWORD
nonn,base,cons,easy,tabf
AUTHOR
N. J. A. Sloane, Apr 16 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)