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.

Previous Showing 61-70 of 354 results. Next

A190128 Numbers 1 through 10000 sorted lexicographically in ternary representation.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 6562, 6563, 2188, 6564, 6565, 6566, 2189, 6567, 6568, 6569, 730, 2190, 6570, 6571, 6572, 2191, 6573, 6574, 6575, 2192, 6576, 6577, 6578, 731, 2193, 6579, 6580, 6581, 2194, 6582, 6583, 6584, 2195, 6585, 6586, 6587, 244
Offset: 1

Views

Author

Reinhard Zumkeller, May 06 2011

Keywords

Comments

A190129 = inverse permutation: a(A190129(n)) = A190129(a(n)) = n;
a(n) <> n for n > 1.

Examples

			a(12) = 2188 -> 10000001  [tern];
a(13) = 6564 -> 100000010 [tern];
a(14) = 6565 -> 100000011 [tern];
a(15) = 6566 -> 100000012 [tern];
a(16) = 2189 -> 10000002  [tern];
a(17) = 6567 -> 100000020 [tern];
a(18) = 6568 -> 100000021 [tern];
a(19) = 6569 -> 100000022 [tern];
a(20) =  730 -> 1000001   [tern];
a(21) = 2190 -> 10000010  [tern];
largest term a(5164) = 10000 -> 111201101 [tern];
last term a(10000) = 6560 -> 22222222 [tern], largest term lexicographically.
		

Crossrefs

Cf. A007089; A190126 (base 2), A190130 (base 8), A190016 (base 10), A190132 (base 12), A190134 (base 16).

Programs

  • Haskell
    import Data.Ord (comparing)
    import Data.List (sortBy)
    a190128 n = a190128_list !! (n-1)
    a190128_list = sortBy (comparing (show . a007089)) [1..10000]

A242399 Write n and 3n in ternary representation and add all trits modulo 3.

Original entry on oeis.org

0, 4, 8, 12, 16, 11, 24, 19, 23, 36, 40, 44, 48, 52, 47, 33, 28, 32, 72, 76, 80, 57, 61, 56, 69, 64, 68, 108, 112, 116, 120, 124, 119, 132, 127, 131, 144, 148, 152, 156, 160, 155, 141, 136, 140, 99, 103, 107, 84, 88, 83, 96, 91, 95, 216, 220, 224, 228, 232
Offset: 0

Views

Author

Reinhard Zumkeller, May 13 2014

Keywords

Examples

			n = 25, 3*n = 75:
.  A007089(25) =  221
.  A007089(75) = 2210
.   add trits    ----
.    modulo 3    2101 = A007089(64), hence a(25) = 64.
		

Crossrefs

Programs

  • Haskell
    a242399 n = foldr (\t v -> 3 * v + t) 0 $
                      map (flip mod 3) $ zipWith (+) ([0] ++ ts) (ts ++ [0])
                where ts = a030341_row n

Formula

a(n) <= 4*n; a(m) = 4*m iff m is a term of A242407.
a(n) = A008586(n) - A242400(n).

A031948 Numbers with exactly two distinct base-3 digits.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A007089.

Programs

  • Maple
    filter:= n -> nops(convert(convert(n,base,3),set))=2:
    select(filter, [$1..200]); # Robert Israel, Nov 29 2017
  • Mathematica
    Select[Range[150],Length[Union[IntegerDigits[#,3]]]==2&] (* Harvey P. Dale, Nov 25 2023 *)

A037381 Numbers k such that every base-3 digit of k is a base-5 digit of k.

Original entry on oeis.org

1, 2, 7, 27, 28, 30, 35, 40, 51, 54, 55, 60, 71, 121, 127, 132, 135, 136, 137, 138, 139, 142, 147, 152, 157, 160, 161, 175, 176, 177, 178, 179, 180, 185, 190, 195, 202, 210, 211, 212, 214, 227, 232, 235, 238, 239, 242, 251, 255
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037381 n = a037381_list !! (n-1)
    a037381_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 5 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    Select[Range[300],SubsetQ[IntegerDigits[#,5],IntegerDigits[#,3]]&] (* Harvey P. Dale, Dec 31 2017 *)

A037382 Numbers k such that every base-3 digit of k is a base-6 digit of k.

Original entry on oeis.org

1, 2, 8, 13, 26, 36, 37, 38, 39, 40, 44, 48, 49, 50, 52, 53, 68, 72, 73, 74, 78, 79, 80, 109, 121, 152, 157, 182, 218, 224, 228, 229, 230, 231, 232, 233, 236, 242, 243, 244, 246, 247, 248, 252, 253, 254, 255, 256, 264, 270, 282, 288
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037382 n = a037382_list !! (n-1)
    a037382_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 6 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    Select[Range[300],SubsetQ[IntegerDigits[#,6],IntegerDigits[#,3]]&] (* Harvey P. Dale, Jun 05 2015 *)

A037383 Numbers k such that every base-3 digit of k is a base-7 digit of k.

Original entry on oeis.org

1, 2, 13, 51, 63, 67, 68, 79, 84, 91, 99, 105, 134, 205, 211, 246, 252, 345, 351, 352, 354, 355, 357, 358, 359, 360, 361, 362, 363, 364, 366, 373, 380, 387, 394, 401, 406, 441, 442, 443, 444, 445, 446, 447, 448, 449, 454, 455, 457
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037383 n = a037383_list !! (n-1)
    a037383_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 7 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
    
  • Mathematica
    Select[Range[500],Complement[Union[IntegerDigits[#,3]],Union[IntegerDigits[#,7]]]=={}&] (* Harvey P. Dale, Jan 28 2024 *)
  • PARI
    upto(N) = my(s7); [n|n<-[1..N], setunion(Set(digits(n, 3)), s7=Set(digits(n, 7)))==s7]; \\ Ruud H.G. van Tol, May 09 2024

A037384 Numbers k such that every base-3 digit of k is a base-8 digit of k.

Original entry on oeis.org

1, 2, 13, 17, 26, 66, 80, 112, 120, 121, 122, 129, 136, 161, 168, 202, 242, 328, 394, 401, 458, 514, 522, 528, 529, 530, 531, 532, 533, 534, 535, 538, 546, 554, 562, 570, 578, 592, 610, 634, 640, 641, 642, 643, 644, 645, 646, 647
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037384 n = a037384_list !! (n-1)
    a037384_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 8 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
    
  • Mathematica
    b3b8Q[n_]:=Module[{b3=Union[IntegerDigits[n,3]],b8=Union[ IntegerDigits[n,8]]}, And@@Table[ MemberQ[b8,b3[[i]]],{i,Length[b3]}]]; Select[Range[700],b3b8Q] (* Harvey P. Dale, Apr 17 2013 *)
  • PARI
    is(n)=#setminus(Set(digits(n,3)), Set(digits(n,8)))==0 \\ Charles R Greathouse IV, Feb 11 2017

A037385 Numbers k such that every base-3 digit of k is a base-9 digit of k.

Original entry on oeis.org

1, 2, 9, 13, 18, 26, 81, 82, 83, 84, 85, 90, 99, 108, 117, 121, 162, 163, 164, 168, 170, 171, 180, 216, 234, 242, 244, 252, 325, 333, 488, 504, 650, 666, 729, 730, 731, 732, 733, 738, 739, 740, 741, 742, 747, 748, 749, 750, 751
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037385 n = a037385_list !! (n-1)
    a037385_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 9 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    Select[Range[1000],SubsetQ[IntegerDigits[#,9],IntegerDigits[#,3]]&] (* Harvey P. Dale, Dec 19 2015 *)

A088151 Value of n-th digit in ternary representation of n^n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 20 2003

Keywords

Comments

a(n)=d(n) with n^n = Sum(d(k)*3^k: 0<=d(k)<3, k>=0).

Examples

			n=7, 7^7=3110367 -> '1112211200121', '111221-------': a(7)=1.
		

Crossrefs

Formula

a(n) = floor(n^n / 3^n) mod 3.

A125291 Number of partitions of n into positive digit values of its ternary representation.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 6, 1, 1, 8, 8, 9, 9, 1, 10, 1, 11, 12, 12, 1, 13, 1, 1, 1, 15, 1, 1, 17, 17, 18, 18, 1, 1, 20, 1, 1, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 1, 28, 1, 29, 30, 30, 1, 31, 1, 32, 33, 33, 34, 34, 35, 35, 36, 36, 1, 37, 1, 38, 39, 39, 1, 40, 1, 1, 1, 42
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2006

Keywords

Comments

a(A125292(n))=1; a(A125293(n))=floor((n+2)/2)=A008619(n).

Crossrefs

Formula

a(n) = 1 + floor(n/2) * (1 - 0^(A062756(n)*A081603(n))).
Previous Showing 61-70 of 354 results. Next