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”).

Numbers in base-12 representation that can be written with decimal digits.
10

%I #19 Apr 09 2016 17:06:47

%S 0,1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,20,21,24,25,26,27,28,29,

%T 30,31,32,33,36,37,38,39,40,41,42,43,44,45,48,49,50,51,52,53,54,55,56,

%U 57,60,61,62,63,64,65,66,67,68,69,72,73,74,75,76,77,78,79,80,81,84,85,86

%N Numbers in base-12 representation that can be written with decimal digits.

%C Numbers that are only in this sequence or only in A039274 but not in both are n= 131, 142, 275, 286, 419, 430 etc: see A039558. [From _R. J. Mathar_, Aug 30 2008]

%H Reinhard Zumkeller, <a href="/A102487/b102487.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Duodecimal.html">Duodecimal</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Duodecimal">Duodecimal</a>

%t fQ[n_] := Last@ Union@ IntegerDigits[n, 12] < 10; Select[ Range[0, 86], fQ] (* _Robert G. Wilson v_, Apr 17 2012 *)

%o (PARI) {for(testn=0,87,

%o lgt=1;

%o for(i=1,1000,if(12^i > testn,lgt=i;break()));

%o atst=testn;pasr=1;

%o for(j=1,lgt,lasd=atst%12;

%o if(lasd<10,atst=(atst-lasd)/12,pasr=0;break()));

%o if(pasr==1,print1(testn,", ")))}

%o \\ _Douglas Latimer_, Apr 17 2012

%o (Haskell)

%o import Data.List (unfoldr)

%o a102487 n = a102487_list !! (n-1)

%o a102487_list = filter (all (< 10) . unfoldr (\x ->

%o if x == 0 then Nothing else Just $ swap $ divMod x 12)) [0..]

%o -- _Reinhard Zumkeller_, Apr 18 2011

%o (Python)

%o A102487_list = [int(str(x), 12) for x in range(10**6)] # _Chai Wah Wu_, Apr 09 2016

%Y Complement of A102488; A102489, A102491, A102493.

%Y Cf. A033048 (subsequence).

%K nonn,base

%O 1,3

%A _Reinhard Zumkeller_, Jan 12 2005