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

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

A031944 Numbers in which digits 0,1,2 all occur in base 3.

Original entry on oeis.org

11, 15, 19, 21, 29, 32, 33, 34, 35, 38, 42, 45, 46, 47, 48, 51, 55, 57, 58, 59, 61, 63, 64, 65, 66, 69, 73, 75, 83, 86, 87, 88, 89, 92, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 110, 113, 114, 115, 116, 119, 123, 126, 127, 128, 129, 132, 135
Offset: 1

Views

Author

Keywords

Comments

A043530(a(n)) = 3; complement of A154314. - Reinhard Zumkeller, Jan 07 2009
A212193(a(n)) = 3. - Reinhard Zumkeller, May 04 2012

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a031944 n = a031944_list !! (n-1)
    a031944_list = elemIndices 3 a212193_list
    -- Reinhard Zumkeller, May 04 2012
    
  • Mathematica
    Select[Range[200],Min[DigitCount[#,3]]>0&] (* Harvey P. Dale, Nov 21 2015 *)
  • Python
    from sympy.ntheory import count_digits
    def ok(n): c = count_digits(n, 3); return all(c[d] > 0 for d in [0, 1, 2])
    print([k for k in range(136) if ok(k)]) # Michael S. Branicky, Nov 15 2021

A037897 (Greatest base 3 digit of n)-(least base 3 digit of n).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A037897 := proc(n)
        local dgs ;
        dgs := convert(n,base,3);
        max(op(dgs))-min(op(dgs)) ;
    end proc: # R. J. Mathar, Oct 19 2015
  • PARI
    A037897(n) = (vecmax(digits(n,3)) - vecmin(digits(n,3))); \\ Antti Karttunen, Aug 11 2017

Formula

a(n) = A190592(n) - A290825(n). - Antti Karttunen, Aug 12 2017

Extensions

Offset corrected by R. J. Mathar, Oct 19 2015
More terms from Antti Karttunen, Aug 11 2017
Showing 1-3 of 3 results.