The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A230959 If n is pandigital then 0 else (digits not occurring in decimal representation of n, arranged in decreasing order). 5

%I #14 Nov 16 2023 14:40:46

%S 987654321,987654320,987654310,987654210,987653210,987643210,

%T 987543210,986543210,976543210,876543210,98765432,987654320,98765430,

%U 98765420,98765320,98764320,98754320,98654320,97654320,87654320,98765431,98765430,987654310,98765410

%N If n is pandigital then 0 else (digits not occurring in decimal representation of n, arranged in decreasing order).

%C a(0) > a(n) for n > 0;

%C a(A171102(n)) = 0 by definition, but also a(A050289(n)) = 0.

%H Reinhard Zumkeller, <a href="/A230959/b230959.txt">Table of n, a(n) for n = 0..10000</a>

%t pd[n_]:=Module[{idn=Sort[IntegerDigits[n]]},If[idn==Range[0,9],0,FromDigits[ Reverse[ Complement[ Range[ 0,9],idn]]]]]; Table[pd[n],{n,0,30}] (* _Harvey P. Dale_, Nov 16 2023 *)

%o (Haskell)

%o import Data.List ((\\))

%o a230959 n = (if null cds then 0 else read cds) :: Integer

%o where cds = "9876543210" \\ show n

%o (Python)

%o def A230959(n): return int(''.join(sorted(set('9876543210')-set(str(n)),reverse=True)) or 0) # _Chai Wah Wu_, Nov 23 2022

%Y Cf. A227362.

%K nonn,base,look

%O 0,1

%A _Reinhard Zumkeller_, Nov 02 2013

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 May 14 13:40 EDT 2024. Contains 372533 sequences. (Running on oeis4.)