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.

A262412 A262411 in ternary representation.

This page as a plain text file.
%I A262412 #4 Sep 22 2015 15:05:40
%S A262412 1,10,11,12,2,20,22,21,100,101,102,110,111,112,120,121,122,200,202,
%T A262412 201,212,210,221,211,222,220,1002,1001,1000,1010,1011,1012,1021,1020,
%U A262412 1101,1022,1102,1110,1100,1111,1112,1120,1121,1122,1201,1200,1211,1202,1212
%N A262412 A262411 in ternary representation.
%C A262412 a(n) = A007089(A262411(n)).
%H A262412 Reinhard Zumkeller, <a href="/A262412/b262412.txt">Table of n, a(n) for n = 1..10000</a>
%e A262412 See A262411.
%o A262412 (Haskell)
%o A262412 import Data.List (inits, tails, intersect, delete)
%o A262412 a262412 n = a262412_list !! (n - 1)
%o A262412 a262412_list = 1 : f [1] (drop 2 a030341_tabf) where
%o A262412    f xs tss = g tss where
%o A262412      g (ys:yss) | null (intersect its $ tail $ inits ys) &&
%o A262412                   null (intersect tis $ init $ tails ys) = g yss
%o A262412                 | otherwise = (foldr (\t v -> 10 * v + t) 0 ys) :
%o A262412                               f ys (delete ys tss)
%o A262412      its = init $ tails xs; tis = tail $ inits xs
%o A262412 -- _Reinhard Zumkeller_, Sep 22 2015
%Y A262412 Cf. A030341, A007089, A262411.
%K A262412 nonn,base
%O A262412 1,2
%A A262412 _Reinhard Zumkeller_, Sep 22 2015