login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319657 Write n in 9-ary, sort digits into increasing order. 9

%I #19 Aug 07 2024 15:50:35

%S 0,1,2,3,4,5,6,7,8,1,10,11,12,13,14,15,16,17,2,11,20,21,22,23,24,25,

%T 26,3,12,21,30,31,32,33,34,35,4,13,22,31,40,41,42,43,44,5,14,23,32,41,

%U 50,51,52,53,6,15,24,33,42,51,60,61,62,7,16,25,34,43,52,61,70,71

%N Write n in 9-ary, sort digits into increasing order.

%H Seiichi Manyama, <a href="/A319657/b319657.txt">Table of n, a(n) for n = 0..6560</a>

%p a:= n-> (l-> add(l[-i]*9^(i-1), i=1..nops(l)))(sort(convert(n, base, 9))):

%p seq(a(n), n=0..71); # _Alois P. Heinz_, Aug 07 2024

%t Table[FromDigits[Sort[IntegerDigits[n, 9]], 9], {n, 0, 100}] (* _Paolo Xausa_, Aug 07 2024 *)

%o (Ruby)

%o def A(k, n)

%o (0..n).map{|i| i.to_s(k).split('').sort.join.to_i(k)}

%o end

%o p A(9, 100)

%o (PARI) a(n) = fromdigits(vecsort(digits(n, 9)), 9); \\ _Michel Marcus_, Sep 25 2018

%Y b-ary: A038573 (b=2), A038574 (b=3), A319652 (b=4), A319653 (b=5), A319654 (b=6), A319655 (b=7), A319656 (b=8), this sequence (b=9), A004185 (b=10).

%Y Cf. A165110.

%K nonn,base,look

%O 0,3

%A _Seiichi Manyama_, Sep 25 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 07:34 EDT 2024. Contains 375959 sequences. (Running on oeis4.)