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.

Showing 1-10 of 21 results. Next

A054637 Partial sums of A054635.

Original entry on oeis.org

0, 1, 3, 4, 4, 5, 6, 7, 9, 11, 11, 13, 14, 16, 18, 19, 19, 19, 20, 20, 21, 22, 22, 24, 25, 26, 26, 27, 28, 29, 30, 31, 33, 34, 36, 36, 37, 39, 40, 41, 43, 45, 47, 47, 47, 49, 49, 50, 52, 52, 54, 56, 57, 57, 59, 60, 61, 63, 64, 66, 68, 70, 70, 72, 74, 75
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Crossrefs

Cf. A054635.

Programs

  • Mathematica
    Accumulate[First[RealDigits[ChampernowneNumber[3], 3, 100, 0]]] (* Paolo Xausa, Jun 19 2024 *)

A055073 Positions in A054635 where the partial sums (A054637) yield primes (A055072).

Original entry on oeis.org

3, 6, 8, 10, 11, 12, 16, 17, 18, 30, 32, 37, 40, 41, 43, 44, 45, 55, 57, 68, 74, 75, 76, 84, 85, 94, 95, 101, 106, 113, 128, 131, 136, 138, 149, 154, 159, 171, 172, 178, 179, 180, 181, 182, 183, 184, 212, 214, 226, 228, 229, 240, 241, 245, 258, 259, 260, 275, 278
Offset: 1

Views

Author

Patrick De Geest, Apr 15 2000

Keywords

Examples

			012101112202122100101102110111112120121122200201...
--|..... sum 0+1+2 = prime 3 at position 3
-----|.. sum 0+1+2+1+0+1 = prime 5 at position 6
-------| sum 0+1+2+1+0+1+1+1 = prime 7 at position 8
		

Crossrefs

Extensions

Definition amended and offset changed by Georg Fischer, Sep 03 2022

A007089 Numbers in base 3.

Original entry on oeis.org

0, 1, 2, 10, 11, 12, 20, 21, 22, 100, 101, 102, 110, 111, 112, 120, 121, 122, 200, 201, 202, 210, 211, 212, 220, 221, 222, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1022, 1100, 1101, 1102, 1110, 1111, 1112, 1120, 1121, 1122, 1200, 1201, 1202, 1210, 1211
Offset: 0

Views

Author

Keywords

Comments

Nonnegative integers with no decimal digit > 2. Thus nonnegative integers in base 10 whose quadrupling by normal addition or multiplication requires no carry operation. - Rick L. Shepherd, Jun 25 2009

References

  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §2.3 Positional Notation, p. 47.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007089 0 = 0
    a007089 n = 10 * a007089 n' + m where (n', m) = divMod n 3
    -- Reinhard Zumkeller, Feb 19 2012
    
  • Maple
    A007089 := proc(n) option remember;
    if n <= 0 then 0
    else
      if (n mod 3) = 0 then 10*procname(n/3) else procname(n-1) + 1 fi
    fi end:
    [seq(A007089(n), n=0..729)]; # - N. J. A. Sloane, Mar 09 2019
  • Mathematica
    Table[ FromDigits[ IntegerDigits[n, 3]], {n, 0, 50}]
  • PARI
    a(n)=if(n<1,0,if(n%3,a(n-1)+1,10*a(n/3)))
    
  • PARI
    a(n)=fromdigits(digits(n,3)) \\ Charles R Greathouse IV, Jan 08 2017
    
  • Python
    def A007089(n):
      n,s = divmod(n,3); t = 1
      while n: n,r = divmod(n,3); t *= 10; s += r*t
      return s # M. F. Hasler, Feb 15 2023

Formula

a(0)=0, a(n) = 10*a(n/3) if n==0 (mod 3), a(n) = a(n-1) + 1 otherwise. - Benoit Cloitre, Dec 22 2002
a(n) = 10*a(floor(n/3)) + (n mod 3) if n > 0, a(0) = 0. - M. F. Hasler, Feb 15 2023

Extensions

More terms from James Sellers, May 01 2000

A033307 Decimal expansion of Champernowne constant (or Mahler's number), formed by concatenating the positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 5, 0, 5, 1, 5, 2, 5, 3, 5, 4, 5, 5, 5, 6, 5
Offset: 0

Views

Author

Keywords

Comments

This number is known to be normal in base 10.
Named after David Gawen Champernowne (July 9, 1912 - August 19, 2000). - Robert G. Wilson v, Jun 29 2014

Examples

			0.12345678910111213141516171819202122232425262728293031323334353637383940414243...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 6.9, p. 442.
  • G. Harman, One hundred years of normal numbers, in M. A. Bennett et al., eds., Number Theory for the Millennium, II (Urbana, IL, 2000), 149-166, A K Peters, Natick, MA, 2002.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 364.
  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970, p. 172.

Crossrefs

See A030167 for the continued fraction expansion of this number.
A007376 is the same sequence but with a different interpretation.
Cf. A007908, A000027, A001191 (concatenate squares).
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), A030998 (b = 7), A031035 and A054634 (b = 8), A031076 (b = 9), A007376 and this sequence (b = 10). - Jason Kimberley, Dec 06 2012
Cf. A065648.
Cf. A365237 (reciprocal).

Programs

  • Haskell
    a033307 n = a033307_list !! n
    a033307_list = concatMap (map (read . return) . show) [1..] :: [Int]
    -- Reinhard Zumkeller, Aug 27 2013, Mar 28 2011
    
  • Magma
    &cat[Reverse(IntegerToSequence(n)):n in[1..50]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten[IntegerDigits/@Range[0, 57]] (* Or *)
    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[#, 10] &, 105] (* Robert G. Wilson v, Jul 23 2012 and modified Jul 04 2014 *)
    intermediate[n_] := Ceiling[FullSimplify[ProductLog[Log[10]/10^(1/9) (n - 1/9)] / Log[10] + 1/9]]; champerDigit[n_] := Mod[Floor[10^(Mod[n + (10^intermediate[n] - 10)/9, intermediate[n]] - intermediate[n] + 1) Ceiling[(9n + 10^intermediate[n] - 1)/(9intermediate[n]) - 1]], 10]; (* David W. Cantrell, Feb 18 2007 *)
    First[RealDigits[ChampernowneNumber[], 10, 100]] (* Paolo Xausa, May 02 2024 *)
  • PARI
    { default(realprecision, 20080); x=0; y=1; d=10.0; e=1.0; n=0; while (y!=x, y=x; n++; if (n==d, d=d*10); e=e*d; x=x+n/e; ); d=0; for (n=0, 20000, x=(x-d)*10; d=floor(x); write("b033307.txt", n, " ", d)); } \\ Harry J. Smith, Apr 20 2009
    
  • Python
    from itertools import count
    def agen():
        for k in count(1): yield from list(map(int, str(k)))
    a = agen()
    print([next(a) for i in range(104)]) # Michael S. Branicky, Sep 13 2021
  • Scala
    val numerStr = (1 to 100).map(Integer.toString()).toList.reduce( + _)
    numerStr.split("").map(Integer.parseInt()).toList // _Alonso del Arte, Nov 04 2019
    

Formula

Let "index" i = ceiling( W(log(10)/10^(1/9) (n - 1/9))/log(10) + 1/9 ) where W denotes the principal branch of the Lambert W function. Then a(n) = (10^((n + (10^i - 10)/9) mod i - i + 1) * ceiling((9n + 10^i - 1)/(9i) - 1)) mod 10. See also Mathematica code. - David W. Cantrell, Feb 18 2007

A007376 The almost-natural numbers: write n in base 10 and juxtapose digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 5, 0, 5, 1, 5, 2, 5, 3, 5, 4, 5, 5, 5, 6, 5, 7
Offset: 0

Views

Author

Keywords

Comments

Also called the Barbier infinite word.
This is an example of a non-morphic sequence.
a(n) = A162711(n,1); A136414(n) = 10*a(n) + a(n+1). - Reinhard Zumkeller, Jul 11 2009
a(A031287(n)) = 0, a(A031288(n)) = 1, a(A031289(n)) = 2, a(A031290(n)) = 3, a(A031291(n)) = 4, a(A031292(n)) = 5, a(A031293(n)) = 6, a(A031294(n)) = 7, a(A031295(n)) = 8, a(A031296(n)) = 9. - Reinhard Zumkeller, Jul 28 2011
May be regarded as an irregular table in which the n-th row lists the digits of n. - Jason Kimberley, Dec 07 2012
The digits of the integer n start at index A117804(n). The digit a(n) at index n belongs to the number A100470(n). - M. F. Hasler, Oct 23 2019
See also the Copeland-Erdős constant A033308, equivalent using primes instead of all numbers. - M. F. Hasler, Oct 24 2019
Decimal expansion of Sum_{k>=1} k/10^(A058183(k) + 1). - Stefano Spezia, Nov 30 2022

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, pp. 114, 336.
  • R. Honsberger, Mathematical Chestnuts from Around the World, MAA, 2001; see p. 163.
  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 26.

Crossrefs

Considered as a sequence of digits, this is the same as the decimal expansion of the Champernowne constant, A033307. See that entry for a formula for a(n), further references, etc.
Cf. A054632 (partial sums), A023103.
Cf. A193428, A256100, A001477 (the nonnegative integers), A117804, A100470.
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), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), this sequence and A033307 (b=10). - Jason Kimberley, Dec 06 2012
Row lengths in A055642.
For primes here see A071620. See A007908 for a very similar sequence.

Programs

  • Haskell
    a007376 n = a007376_list !! (n-1)
    a007376_list = concatMap (map (read . return) . show) [0..] :: [Int]
    -- Reinhard Zumkeller, Nov 11 2013, Dec 17 2011, Mar 28 2011
    
  • Magma
    &cat[Reverse(IntegerToSequence(n)):n in[0..31]]; // Jason Kimberley, Dec 07 2012
    
  • Maple
    c:=proc(x,y) local s: s:=proc(m) nops(convert(m,base,10)) end: if y=0 then 10*x else x*10^s(y)+y: fi end: b:=proc(n) local nn: nn:=convert(n,base,10):[seq(nn[nops(nn)+1-i],i=1..nops(nn))] end: A:=0: for n from 1 to 75 do A:=c(A,n) od: b(A); # c concatenates 2 numbers while b converts a number to the sequence of its digits - Emeric Deutsch, Jul 27 2006
    #alternative
    A007376 := proc(n) option remember ; local aprev, dOld,N ; if n <=9 then RETURN([n,n,1]) ; else aprev := A007376(n-1) ; dOld := op(3,aprev) ; N := op(2,aprev) ; if dOld < A055642(N) then RETURN([op(-dOld-1,convert(N,base,10)),N,dOld+1]) ; else RETURN([op(-1,convert(N+1,base,10)),N+1,1]) ; fi ; fi ; end: # R. J. Mathar, Jan 21 2008
  • Mathematica
    Flatten[ IntegerDigits /@ Range@ 57] (* Or *)
    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[#, 10] &, 105] (* updated Jun 29 2014 *)
    With[{nn=120},RealDigits[N[ChampernowneNumber[],nn],10,nn]][[1]] (* Harvey P. Dale, Mar 13 2018 *)
  • PARI
    for(n=0,90,v=digits(n);for(i=1,#v,print1(v[i]", "))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    apply( A007376(n)={for(k=1,n, k*10^k>n&& return(digits(n\k)[n%k+1]); n+=10^k)}, [0..200]) \\ M. F. Hasler, Nov 03 2019
    
  • Python
    A007376_list = [int(d) for n in range(10**2) for d in str(n)] # Chai Wah Wu, Feb 04 2015

Extensions

Extended to a(0) = 0 by M. F. Hasler, Oct 23 2019

A030190 Binary Champernowne sequence (or word): write the numbers 0,1,2,3,4,... in base 2 and juxtapose.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0
Offset: 0

Views

Author

Keywords

Comments

a(A003607(n)) = 0 and for n > 0: a(A030303(n)) = 1. - Reinhard Zumkeller, Dec 11 2011
An irregular table in which the n-th row lists the bits of n (see the example section). - Jason Kimberley, Dec 07 2012
The binary Champernowne constant: it is normal in base 2. - Jason Kimberley, Dec 07 2012
This is the characteristic function of A030303, which gives the indices of 1's in this sequence and has first differences given by A066099. - M. F. Hasler, Oct 12 2020

Examples

			As an array, this begins:
0,
1,
1, 0,
1, 1,
1, 0, 0,
1, 0, 1,
1, 1, 0,
1, 1, 1,
1, 0, 0, 0,
1, 0, 0, 1,
1, 0, 1, 0,
1, 0, 1, 1,
1, 1, 0, 0,
1, 1, 0, 1,
1, 1, 1, 0,
1, 1, 1, 1,
1, 0, 0, 0, 0,
1, 0, 0, 0, 1,
...
		

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A007376, A003137, A030308. Same as and more fundamental than A030302, but I have left A030302 in the OEIS because there are several sequences that are based on it (A030303 etc.). - N. J. A. Sloane.
a(n) = T(A030530(n), A083652(A030530(n))-n-1), T as defined in A083651, a(A083652(k))=1.
Tables in which the n-th row lists the base b digits of n: this sequence and A030302 (b=2), A003137 and A054635 (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
A076478 is a similar sequence.
For run lengths see A056062; see also A318924.
See also A066099 for (run lengths of 0s) + 1 = first difference of positions of 1s given by A030303.

Programs

  • Haskell
    import Data.List (unfoldr)
    a030190 n = a030190_list !! n
    a030190_list = concatMap reverse a030308_tabf
    -- Reinhard Zumkeller, Jun 16 2012, Dec 11 2011
    
  • Magma
    [0]cat &cat[Reverse(IntegerToSequence(n,2)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten[ Table[ IntegerDigits[n, 2], {n, 0, 26}]] (* Robert G. Wilson v, Mar 08 2005 *)
    First[RealDigits[ChampernowneNumber[2], 2, 100, 0]] (* Paolo Xausa, Jun 16 2024 *)
  • PARI
    A030190_row(n)=if(n,binary(n),[0]) \\ M. F. Hasler, Oct 12 2020
    
  • Python
    from itertools import count, islice
    def A030190_gen(): return (int(d) for m in count(0) for d in bin(m)[2:])
    A030190_list = list(islice(A030190_gen(),30)) # Chai Wah Wu, Jan 07 2022

A030302 Write n in base 2 and juxtapose; irregular table in which row n lists the binary expansion of n.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

The binary Champernowne constant: it is normal in base 2. - Jason Kimberley, Dec 07 2012
A word that is recurrent, but neither morphic nor uniformly recurrent. - N. J. A. Sloane, Jul 14 2018
See A030303 for the indices of 1's (so this is the characteristic function of A030303), with first differences (i.e., run lengths of 0's, increased by 1, with two consecutive 1's delimiting a run of zero 0's) given by A066099. - M. F. Hasler, Oct 12 2020

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Essentially the same as A007088 and A030190. Cf. A030303, A007088.
Tables in which the n-th row lists the base b digits of n: A030190 and this sequence (b=2), A003137 and A054635 (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]
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

Programs

  • Magma
    &cat[Reverse(IntegerToSequence(n,2)): n in [1..31]]; // Jason Kimberley, Mar 02 2012
    
  • Maple
    A030302 := proc(n) local i,t1,t2; t1:=convert(n,base,2); t2:=nops(t1); [seq(t1[t2+1-i],i=1..t2)]; end; # N. J. A. Sloane, Apr 08 2021
  • Mathematica
    i[n_] := Ceiling[FullSimplify[ProductLog[Log[2]/2 (n - 1)]/Log[2] + 1]]; a[n_] := Mod[Floor[2^(Mod[n + 2^i[n] - 2, i[n]] - i[n] + 1) Ceiling[(n + 2^i[n] - 1)/i[n] - 1]], 2]; (* David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007 *)
    Join @@ Table[ IntegerDigits[i, 2], {i, 1, 40}] (* Olivier Gérard, Mar 28 2011 *)
    Flatten@ IntegerDigits[ Range@ 25, 2] (* or *)
    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[#, 2] &, 105] (* Robert G. Wilson v, Jun 29 2014 *)
  • Python
    from itertools import count, islice
    def A030302_gen(): # generator of terms
        return (int(d) for n in count(1) for d in bin(n)[2:])
    A030302_list = list(islice(A030302_gen(),30)) # Chai Wah Wu, Feb 18 2022

Formula

a(n) = (floor(2^(((n + 2^i - 2) mod i) - i + 1) * ceiling((n + 2^i - 1)/i - 1))) mod 2 where i = ceiling( W(log(2)/2 (n - 1))/log(2) + 1 ) and W denotes the principal branch of the Lambert W function. See also Mathematica code. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007

A030548 Write n in base 6 and juxtapose.

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, 5, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, 5, 5, 0, 5, 1, 5, 2, 5, 3, 5, 4, 5, 5, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 1, 0, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Base-6 analog of what in base 7 is A030998, in base 10 is A007376. In general, the Barbier infinite word base n (in this case, 6). - Jonathan Vos Post, May 13 2007
An irregular table in which the n-th row lists the base-6 digits of n. - Jason Kimberley, Dec 07 2012
The base-6 Champernowne constant: It is normal in base 6. - Jason Kimberley, Dec 07 2012

Crossrefs

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), this sequence (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), A007376 and A033307 (b=10). - Jason Kimberley, Dec 06 2012
Cf. A030567 for the same table with reversed rows.

Programs

  • Magma
    &cat[Reverse(IntegerToSequence(n,6)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten@ IntegerDigits[ Range@ 50, 6] (* or *)
    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[ a[#, 6] &, 105] (* Robert G. Wilson v, Jul 01 2014 *)
  • Python
    from itertools import count, chain, islice
    from sympy.ntheory.factor_ import digits
    def A030548_gen(): return chain.from_iterable(digits(m, 6)[1:] for m in count(1))
    A030548_list = list(islice(A030548_gen(), 30)) # Chai Wah Wu, Jan 07 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Aug 23 2007

A081604 Number of digits in ternary representation of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 23 2003

Keywords

Comments

a(n) is the length of row n in table A054635. - Reinhard Zumkeller, Sep 05 2014

Examples

			a(8) = 2 because 8 = 22_3, having 2 digits.
a(9) = 3 because 9 = 100_3, having 3 digits.
		

Crossrefs

Programs

  • Haskell
    a081604 n = if n < 3 then 1 else a081604 (div n 3) + 1
    -- Reinhard Zumkeller, Sep 05 2014, Feb 21 2013
  • Maple
    A081604 := proc(n)
        max(1,1+ilog[3](n)) ;
    end proc: # R. J. Mathar, Jul 12 2016
  • Mathematica
    Table[Length[IntegerDigits[n, 3]], {n, 0, 99}] (* Alonso del Arte, Dec 30 2012 *)
    Join[{1},IntegerLength[Range[120],3]] (* Harvey P. Dale, Apr 07 2019 *)

Formula

a(n) = A062153(n) + 1 for n >= 1.
a(n) = A077267(n) + A062756(n) + A081603(n);
From Reinhard Zumkeller, Oct 19 2007: (Start)
0 <= A134021(n) - a(n) <= 1;
a(A134025(n)) = A134021(A134025(n));
a(A134026(n)) = A134021(A134026(n)) - 1. (End)
a(n+1) = -Sum_{k=1..n} mu(3*k)*floor(n/k). - Benoit Cloitre, Oct 21 2009
a(n) = floor(log_3(n)) + 1. - Can Atilgan and Murat Erşen Berberler, Dec 05 2012
a(n) = if n < 3 then 1 else a(floor(n/3)) + 1. - Reinhard Zumkeller, Sep 05 2014
G.f.: 1 + (1/(1 - x))*Sum_{k>=0} x^(3^k). - Ilya Gutkovskiy, Jan 08 2017

A031219 Write n in base 5 and juxtapose.

Original entry on oeis.org

1, 2, 3, 4, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, 2, 0, 1, 2, 1, 1, 2, 2, 1, 2, 3, 1, 2, 4, 1
Offset: 1

Views

Author

Keywords

Comments

An irregular table in which the n-th row lists the base-5 digits of n. - Jason Kimberley, Dec 07 2012
The base-5 Champernowne constant: it is normal in base 5. - Jason Kimberley, Dec 07 2012

Crossrefs

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), this sequence (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

Programs

  • Magma
    &cat[Reverse(IntegerToSequence(n,5)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten@ IntegerDigits[ Range@ 40, 5] (* or *)
    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[ a[#, 5] &, 105] (* Robert G. Wilson v, Jul 01 2014 *)
  • Python
    from itertools import count, chain, islice
    from sympy.ntheory.factor_ import digits
    def A031219_gen(): return chain.from_iterable(digits(m, 5)[1:] for m in count(1))
    A031219_list = list(islice(A031219_gen(), 30)) # Chai Wah Wu, Jan 07 2022
Showing 1-10 of 21 results. Next