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-5 of 5 results.

A049354 Digitally balanced numbers in base 3: equal numbers of 0's, 1's, 2's.

Original entry on oeis.org

11, 15, 19, 21, 260, 266, 268, 278, 290, 294, 302, 304, 308, 312, 316, 318, 332, 344, 348, 380, 384, 396, 410, 412, 416, 420, 424, 426, 434, 438, 450, 460, 462, 468, 500, 502, 508, 518, 520, 524, 528, 532, 534, 544, 550, 552, 572, 574, 578, 582, 586, 588, 596
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A049354-A049360. See also A061854, A037861.
Row n = 3 of A378000.

Programs

  • Haskell
    a049354 n = a049354_list !! (n-1)
    a049354_list = filter f [1..] where
       f n = t0 == a062756 n && t0 == a081603 n where t0 = a077267 n
    -- Reinhard Zumkeller, Aug 09 2014
    
  • Mathematica
    Select[Range[600],Length[Union[DigitCount[#,3]]]== 1&]
    FromDigits[#,3]&/@DeleteCases[Flatten[Permutations/@Table[PadRight[{},3n,{1,0,2}],{n,3}],1],?(#[[1]]==0&)]//Sort (* _Harvey P. Dale, May 30 2016 *)
    Select[Range@5000, Differences@DigitCount[#,3]=={0,0}&] (* Hans Rudolf Widmer, Dec 11 2021 *)
  • Python
    from sympy.ntheory import count_digits
    def ok(n): c = count_digits(n, 3); return c[0] == c[1] == c[2]
    print([k for k in range(600) if ok(k)]) # Michael S. Branicky, Nov 15 2021

Formula

A062756(a(n)) = A077267(a(n)) and A081603(a(n)) = A077267(a(n)). - Reinhard Zumkeller, Aug 09 2014

A154314 Numbers with not more than two distinct digits in ternary representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 36, 37, 39, 40, 41, 43, 44, 49, 50, 52, 53, 54, 56, 60, 62, 67, 68, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2009

Keywords

Crossrefs

Complement of A031944.
Union of A032924, A005823 and A005836.

Programs

  • Haskell
    import Data.List (findIndices)
    a154314 n = a154314_list !! (n-1)
    a154314_list = findIndices (/= 3) a212193_list
    -- Reinhard Zumkeller, May 04 2012
    
  • Mathematica
    Select[Range[0,200],Length[Union[IntegerDigits[#,3]]]<3&] (* Harvey P. Dale, Nov 23 2012 *)
  • PARI
    is(n)=#Set(digits(n,3))<3 \\ Charles R Greathouse IV, Mar 17 2014

Formula

A043530(a(n)) <= 2.
A212193(a(n)) <> 3. - Reinhard Zumkeller, May 04 2012
a(n) >> n^1.58..., where the exponent is log(3)/log(2). - Charles R Greathouse IV, Mar 17 2014
Sum_{n>=2} 1/a(n) = 5.47555542241781419692840472181029603722178623821762258873485212626135391726959422416350447132335696748507... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Apr 14 2025

A212193 In ternary representation of n: a(n) = if n is pandigital then 3 else least digit not used.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 04 2012

Keywords

Comments

a(A032924(n)) = 0; a(A081605(n)) <> 0;
a(A031944(n)) = 3; a(A154314(n)) <> 3.

Examples

			.   0 ->   '0':   a(0) = 1
.   1 ->   '1':   a(1) = 0
.   2 ->   '2':   a(2) = 0
.   3 ->  '10':   a(3) = 2
.   4 ->  '11':   a(4) = 0
.   5 ->  '12':   a(5) = 0
.   6 ->  '20':   a(6) = 1
.   7 ->  '21':   a(7) = 0
.   8 ->  '22':   a(8) = 0
.   9 -> '100':   a(9) = 2
.  10 -> '101':  a(10) = 2
.  11 -> '102':  a(11) = 3  <-- 11 is the smallest 3-pandigital number
.  12 -> '110':  a(12) = 2
.  13 -> '111':  a(13) = 0
.  14 -> '112':  a(14) = 0
.  15 -> '120':  a(15) = 3.
		

Crossrefs

Cf. A007089, A067898 (decimal).

Programs

  • Haskell
    import Data.List (delete)
    a212193 n = f n [0..3] where
       f x ys | x <= 2    = head $ delete x ys
              | otherwise = f x' $ delete d ys where (x',d) = divMod x 3

A043530 Number of distinct base-3 digits of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 1, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2
Offset: 1

Views

Author

Keywords

Comments

a(A031944(n)) = 3; a(A154314(n)) < 3. - Reinhard Zumkeller, Jan 07 2009
Image, under the coding sending i -> 1+floor(i/3), of the fixed point, starting with 0, of the morphism 0 -> 012, 1 -> 314, 2 -> 542, 3 -> 336, 4 -> 644, 5 -> 565, 6 -> 666. - Jeffrey Shallit, May 15 2016

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[IntegerDigits[n,3]]],{n,90}] (* Harvey P. Dale, May 13 2020 *)
  • PARI
    a(n) = #vecsort(digits(n,3),,8); \\ Michel Marcus, May 16 2016

A158928 a(n) is the smallest integer not yet in the sequence with no common base-3 digit with a(n-1).

Original entry on oeis.org

1, 2, 3, 8, 4, 6, 13, 18, 40, 20, 121, 24, 364, 26, 9, 80, 10, 242, 12, 728, 27, 2186, 28, 6560, 30, 19682, 31, 59048, 36, 177146, 37, 531440, 39, 1594322, 81, 4782968, 82, 14348906, 84, 43046720, 85, 129140162, 90, 387420488, 91, 1162261466, 93
Offset: 1

Views

Author

R. J. Mathar, Mar 31 2009

Keywords

Comments

Numbers of A031944 do not appear in this sequence. After a number which has base-3 digits 0 and 1, a number of the form 3^k-1 (see A024023) follows by definition, because its base-3 digits are all 2.

Examples

			The 4th term cannot be 4 because 4(base10)=11(base3) shares a common digit 1 with a(3)=3(base10)=10(base3). It cannot be 5(base10)=12(base3) because this shares the digit 1 with 3=10(base3). It cannot be 6(base10)=20(base3) because this shares the digit 0 with 3=10(base3). It cannot be 7(base10)=21(base3) because this shares the digit 1 with 3=10(base3). It becomes a(4)=8(base10)=22(base3) which does not have the digit 0 or 1 of a(3)=10(base3).
		

Crossrefs

Cf. A067581 (base-10), A158929 (base-4), A158930 (base-5).
Showing 1-5 of 5 results.