A050278 Pandigital numbers: numbers containing the digits 0-9. Version 1: each digit appears exactly once.
1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689, 1023457698, 1023457869, 1023457896, 1023457968, 1023457986, 1023458679, 1023458697, 1023458769, 1023458796, 1023458967, 1023458976, 1023459678, 1023459687, 1023459768
Offset: 1
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..1000
- Eric Weisstein's World of Mathematics, Pandigital Number
- Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024. See p. 1.
Crossrefs
Programs
-
Mathematica
Select[ FromDigits@# & /@ Permutations[ Range[0, 9]], # > 10^9 &, 20] (* Robert G. Wilson v, May 30 2010, Jan 17 2012 *)
-
PARI
A050278(n)={ my(b=vector(9,k,1+(n+9!-1)%(k+1)!\k!), t=b[9]-1, d=vector(9,i,i+(i>t)-1)); for(i=1,8, t=10*t+d[b[9-i]]; d=vecextract(d,Str("^"b[9-i]))); t*10+d[1]} \\ M. F. Hasler, Jan 15 2012
-
PARI
is_A050278(n)={ 9<#vecsort(Vecsmall(Str(n)),,8) & n<1e10 } /* assuming that n is a nonnegative integer */ /* M. F. Hasler, Jan 10 2012 */
-
PARI
a(n)=my(d=numtoperm(10,n+9!-1));sum(i=1,#d,(d[i]-1)*10^(#d-i)) \\ David A. Corneth, Jun 01 2014
-
Python
from itertools import permutations A050278_list = [int(''.join(d)) for d in permutations('0123456789',10) if d[0] != '0'] # Chai Wah Wu, May 25 2015
Formula
Extensions
Edited by N. J. A. Sloane, Sep 25 2010 to clarify that this is a finite sequence
Comments