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!)
A283001 a(n) = (A004186(n) - n)/9. 2

%I #30 Mar 06 2017 17:24:02

%S 0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,0,0,0,1,2,3,4,5,6,7,0,0,0,0,

%T 1,2,3,4,5,6,0,0,0,0,0,1,2,3,4,5,0,0,0,0,0,0,1,2,3,4,0,0,0,0,0,0,0,1,

%U 2,3,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,0,0,1

%N a(n) = (A004186(n) - n)/9.

%C A004186(n) is the number formed when the digits of n are sorted nonincreasingly.

%C Is this the same as A037887 or A037851? - _R. J. Mathar_, Mar 06 2017

%H David A. Corneth, <a href="/A283001/b283001.txt">Table of n, a(n) for n = 0..9999</a>

%F a(10*n) = 10*a(n).

%e a(141) = (411 - 141)/9 = 30.

%t s[n_]:= FromDigits@ Reverse@ Sort@ IntegerDigits@ n; a[n_]:=(s[n]-n)/9; Table[a[n],{n,0,89}] (* _Indranil Ghosh_, Feb 26 2017 *)

%o (PARI) a(n) = my(d = digits(n), v=vecsort(d,,4)-d); sum(i=1,#v,v[i]*10^(#v-i)) / 9

%o (Python) def A283001(n): return (int("".join(sorted(str(n),reverse=True)))-n)/9 # _Indranil Ghosh_, Feb 26 2017

%Y Cf. A004186, A037887, A037851.

%K nonn,base,easy,look

%O 0,14

%A _David A. Corneth_, Feb 26 2017

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 April 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)