cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A050278 Pandigital numbers: numbers containing the digits 0-9. Version 1: each digit appears exactly once.

Original entry on oeis.org

1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689, 1023457698, 1023457869, 1023457896, 1023457968, 1023457986, 1023458679, 1023458697, 1023458769, 1023458796, 1023458967, 1023458976, 1023459678, 1023459687, 1023459768
Offset: 1

Views

Author

Eric W. Weisstein, Dec 11 1999

Keywords

Comments

This is a finite sequence with 9*9! = 3265920 terms: a(9*9!) = 9876543210.
A171102 is the infinite version, where each digit must appear at least once.
More precisely, this is exactly the subset of the first 9*9! terms of A171102. - M. F. Hasler, Jan 05 2020
Subsequence of A134336 and of A178403; A178401(a(n)) = 1. - Reinhard Zumkeller, May 27 2010
Smallest prime factors: A178775(n) = A020639(a(n)). - Reinhard Zumkeller, Jun 11 2010
A178788(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2010
All these numbers are composite because the sum of the digits, 45, is divisible by 9. - T. D. Noe, Nov 09 2011
This is the 10th row of the array T(k,n) = n-th number in which the number of distinct base-10 digits is k. A031969 is the 4th row. A220063 is the 5th row. A220076 is the 6th row. A218019 is the 7th row. A219743 is the 8th row. - Jonathan Vos Post, Dec 05 2012
From Hieronymus Fischer, Feb 13 2013: (Start)
The sum of all terms is 9!*49444444440 = 17942399998387200.
General formula for the sum of all terms of the finite sequence of the corresponding base-p pandigital numbers with p places: sum = ((p^2 - p - 1)*(p^p - 1) + p - 1)*(p-2)!/2.
General formula for the sum of all terms (interpreted as decimal permutational numbers with exactly d+1 different digits from the range 0..d < 10): sum = (d+1)!*((10d - 1)*10^d - d + 1)/18, d > 1.
(End)

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

A050278 = 9*A171571. - M. F. Hasler, Jan 12 2012
A050278(n) = A171102(n) for n <= 9*9!.

Extensions

Edited by N. J. A. Sloane, Sep 25 2010 to clarify that this is a finite sequence

A171102 Pandigital numbers: numbers containing the digits 0-9. Version 2: each digit appears at least once.

Original entry on oeis.org

1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689, 1023457698, 1023457869, 1023457896, 1023457968, 1023457986, 1023458679, 1023458697, 1023458769, 1023458796, 1023458967, 1023458976
Offset: 1

Views

Author

N. J. A. Sloane, Sep 25 2010

Keywords

Comments

This is the infinite version. See A050278 for the finite version.
The first 9*9!=3265920 terms of this sequence are permutations of the digits 0-9 with a(9*9!)=9876543210 (see Version 1, A050278). - Jeremy Gardiner, May 29 2010
Subsequence of A134336 and of A178403; A178401(a(n))>0. - Reinhard Zumkeller, May 27 2010
Smallest prime factors: A178775(n) = A020639(a(n)). - Reinhard Zumkeller, Jun 11 2010
A178788(a(n)) = 1, for n <= 9*9!, else A178788(a(n)) = 0. - Reinhard Zumkeller, Jun 30 2010 [corrected by Hieronymus Fischer, Feb 02 2013]
A230959(a(n)) = 0. - Reinhard Zumkeller, Nov 02 2013
The first term of the sequence absent in A050278 is a(3265921) = 10123456789. Also, the first prime is a(3306373) = 10123457689 = A050288(1). - Zak Seidov, Sep 23 2015
Almost all numbers are in this sequence, in the sense that it has asymptotic density equal to 1. Indeed, the fraction of n-digit numbers which don't have a given digit d is roughly 0.9^n (not exactly because the first digit is chosen among {1..9}) which tends to zero as n -> oo. - M. F. Hasler, Jan 05 2020

Crossrefs

Subsequence of A253172.

Programs

  • Mathematica
    Take[ Select[ FromDigits@# & /@ Permutations[ Range[0, 9], {10}], # > 10^9 &], 20] (* Robert G. Wilson v, May 30 2010 *)
  • PARI
    is_A171102(n)=9<#vecsort(Vecsmall(Str(n)),,8) /* assuming that n is a nonnegative integer. In PARI/GP V.2.4 - 2.9 this is faster than other possibilities involving Set(),Vec(),eval() or digits() */ \\ M. F. Hasler, Jan 10 2012, Sep 19 2017
    
  • PARI
    A171102=A050278 /*** valid for n <= 9*9! ***/ \\ M. F. Hasler, Jan 10 2012

Formula

a(n) = 1011111111 + A178478(n) for n = 1,...,8!. - M. F. Hasler, Jan 10 2012
A171102(n) = A050278(n) for n <= 9*9!.

A204532 Largest prime factors of zerofull restricted pandigital numbers A050278.

Original entry on oeis.org

5689, 1283, 113717431, 15683, 4919, 16245349, 113717521, 3344633, 5415121, 80309, 546719, 71341, 37905877, 113717633, 277, 28429411, 1006351, 6473, 8353, 393487, 18679, 599, 1403923, 693401, 113718421, 56859211, 113718431, 17827, 56859221, 2145631, 37906207
Offset: 1

Views

Author

Zak Seidov, Jan 16 2012

Keywords

Comments

Largest term is a(3265903)=1097393447.
In defense of this sequence, let me say that when one is studying a sequence for which no formula or recurrence is known, one line of attack is to look at the largest prime factors of the terms. This might reveal some hidden property, or suggest a connection with a different sequence. - N. J. A. Sloane, Jan 17 2012

Crossrefs

Showing 1-3 of 3 results.