login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212193
In ternary representation of n: a(n) = if n is pandigital then 3 else least digit not used.
6
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,4
COMMENTS
a(A032924(n)) = 0; a(A081605(n)) <> 0;
a(A031944(n)) = 3; a(A154314(n)) <> 3.
LINKS
Eric Weisstein's World of Mathematics, Ternary
Eric Weisstein's World of Mathematics, Pandigital Number
EXAMPLE
. 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.
PROG
(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
CROSSREFS
Cf. A007089, A067898 (decimal).
Sequence in context: A284394 A188170 A363805 * A253189 A126030 A111373
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 04 2012
STATUS
approved