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-9 of 9 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

A199630 Numbers having each digit once and whose square has each digit twice.

Original entry on oeis.org

3175462089, 3175804269, 3204957816, 3206549178, 3210754689, 3254196708, 3260974851, 3275409816, 3284591706, 3290581476, 3406829517, 3410856297, 3459186720, 3469857012, 3475806912, 3501249678, 3512067849, 3519876240, 3549716208, 3564980172, 3587902614
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Examples

			3175462089^2 = 10083559478676243921.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199631, A365144, A199632, A199633. Subsequence of A114258.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^2]] == {2} &]; FromDigits /@ t2

A199631 Numbers having each digit once and whose cube has each digit three times.

Original entry on oeis.org

4680215379, 4752360918, 4765380219, 4915280637, 5063248197, 5164738920, 5382417906, 5426370189, 5429013678, 5628130974, 5679321048, 5697841320, 5762831940, 5783610492, 5786430129, 5903467821, 6019285734, 6053147982, 6095721483, 6143720958, 6158723094
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Examples

			4680215379^3 = 102517384602327906545167884939.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199630, A365144, A199632, A199633. Subsequence of A114259.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^3]] == {3} &]; FromDigits /@ t2

A199632 Numbers having each digit once and whose 5th power has each digit five times.

Original entry on oeis.org

7351062489, 8105632794, 8401253976, 8731945026, 9164072385, 9238750614, 9615278340, 9847103256
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Comments

There are 8 numbers total. Subsequence of A114261.

Examples

			7351062489 ^5 = 21465972705539303240727164839587886180361092651449.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199630, A199631, A114260, A114261, A199633.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^5]] == {5} &]; FromDigits /@ t2

A365144 Numbers having each digit once and whose 4th power has each digit four times.

Original entry on oeis.org

5702631489, 7264103985, 7602314895, 7824061395, 8105793624, 8174035962, 8304269175, 8904623175, 8923670541, 9451360827, 9785261403, 9804753612, 9846032571
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Comments

Currently same terms as A114260, but that sequence has more terms to follow. - Ray Chandler, Aug 23 2023

Examples

			5702631489 is a term since its 4th power 1057550783692741389295697108242363408641 contains four 5's, four 7's, four 0's and so on.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199630, A199631, A199633. Subsequence of A114260.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^4]] == {4} &]; FromDigits /@ t2 (* T. D. Noe, Nov 08 2011 *)

A370667 Largest pandigital number whose n-th power contains each digit (0-9) exactly n times.

Original entry on oeis.org

9876543210, 9876124053, 9863527104, 9846032571, 9847103256, 9247560381
Offset: 1

Views

Author

Zhining Yang, Mar 13 2024

Keywords

Comments

If an n-th power of a pandigital number k contains each digit (0-9) exactly n times, it implies that 10^(10 - 1/n) <= 9876543210, so n <= 185. It's easy to verify that no solutions exist for n=7 to 185.

Examples

			a(4) = 9846032571 because it is the largest 10-digit number that contains each digit (0-9) exactly once and its 4th power 9398208429603554221689707364750715341681 contains each digit (0-9) exactly 4 times.
		

Crossrefs

Programs

  • Mathematica
    s=FromDigits/@Permutations[Range[0,9]];For[n=1,n<=6,n++,For[k=Length@s,k>0,k--,If[Count[Tally[IntegerDigits[s[[k]]^n]][[All,2]],n]==10,Print[{n,s[[k]]}];Break[]]]]
  • Python
    from itertools import permutations
    a=[]
    for n in range(1,7):
        for k in [int(''.join(d)) for d in permutations('9876543210', 10)]:
            if all(str(k**n).count(d) ==n for d in '0123456789'):
                a.append(k)
                break
    print(a)

A199634 Number of pandigital numbers raised to the n-th power is a number in which each digit appears n times.

Original entry on oeis.org

3265920, 534, 74, 13, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Comments

Note that a(1) is the number of pandigital numbers, 10! - 9! = 9*9!. For n > 1, it is the number of numbers in A199630, A199631, A365144, A199632, and A199633.
The Mathematica code takes many hours to run. The program stops after doing power 186 because the largest pandigital number 9876543210 raised to any greater power does not produce enough digits.

Crossrefs

Cf. A050278 (pandigital numbers), A199630, A199631, A365144, A199632, A199633.

Programs

  • Mathematica
    t = {}; perm = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; len = Length[perm]; Print[{1, len}]; AppendTo[t, len]; pwr = 1; i = 1; While[pwr++; i < len, While[IntegerLength[FromDigits[perm[[i]]]^pwr] < 10*pwr, i++]; cnt = 0; Do[If[Union[DigitCount[FromDigits[perm[[j]]]^pwr]] == {pwr}, cnt++], {j, i, len}]; Print[{pwr, cnt}]; AppendTo[t, cnt]]

A363160 Smallest positive integer m with all digits distinct such that m^n contains each digit of m exactly n times, or -1 if no such m exists.

Original entry on oeis.org

1, 406512, 516473892, 5702631489, 961527834, 7025869314, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Jean-Marc Rebert, Sep 07 2023

Keywords

Comments

For 7 <= n <= 185, I tried all possibilities with at most 10 distinct digits and I found no solution.
9876543210^186 has only 1859 < 186 * 10 = 1860 digits, so a(n) = -1 for n = 186.
So 9876543210^n has fewer than 10*n digits for n >= 186, so a(n) = -1 for n >= 186.

Examples

			a(1) = 1, because 1^1 = 1 has each digit of 1, 1 time, and no lesser number > 0 satisfies this.
a(2) = 406512, because 406512 has distinct digits, 406512^2 = 165252006144 has each digit of 406512, 2 times, and no lesser number satisfies this.
n a(n)        a(n)^n
1 1           1
2 406512      165252006144
3 516473892   137766973511455269432948288
4 5702631489  1057550783692741389295697108242363408641
5 961527834   821881685441327565743977956591832631269739424
6 7025869314  120281934463386157260042215510596389732740014997586987548736
		

Crossrefs

Programs

  • Mathematica
    hasDistinctDigitsQ[m_Integer?NonNegative]:=Length@IntegerDigits@m==Length@DeleteDuplicates@IntegerDigits@m;validNumberQ[n_Integer?NonNegative,m_Integer?NonNegative]:=AllTrue[Tally@IntegerDigits@m,Function[{digitFreq},MemberQ[Tally@IntegerDigits[m^n],{digitFreq[[1]],n*digitFreq[[2]]}]]];a[n_Integer?Positive,ex_Integer?Positive]:=Module[{m=1},Monitor[While[True,If[hasDistinctDigitsQ[m]&&validNumberQ[n,m],Return[m]];m++;If[m>10^(ex*n),Return[-1]];];m,m]];Table[a[n,7],{n,1,7}] (* Robert P. P. McKone, Sep 09 2023 *)

A371469 Least pandigital number whose n-th power contains each digit (0-9) exactly n times.

Original entry on oeis.org

1023456789, 3175462089, 4680215379, 5702631489, 7351062489, 7025869314
Offset: 1

Views

Author

Zhining Yang, Apr 01 2024

Keywords

Comments

If an n-th power of a pandigital number k contains each digit (0-9) exactly n times, it implies that 10^(10 - 1/n) <= 9876543210, so n <= 185. It's easy to verify that no solutions exist for n=7 to 185.
For the largest pandigital number whose n-th power contains each digit (0-9) exactly n times, see A370667.

Examples

			a(4) = 5702631489 because it is the least 10-digit number that contains each digit (0-9) exactly once and its 4th power 1057550783692741389295697108242363408641 contains each digit (0-9) exactly 4 times.
		

Crossrefs

Programs

  • Mathematica
    s = FromDigits /@ Permutations[Range[0, 9]]; For[n = 1, n < 7, n++,
     For[k = 1, k <= Length@s, k++,
      If[Count[Tally[IntegerDigits[s[[k]]^n]][[All, 2]], n] == 10,
       Print[{n, s[[k]]}]; Break[]]]]
  • Python
    from itertools import permutations as per
    a=[]
    for n in range(1,7):
        for k in [int(''.join(d)) for d in per('0123456789', 10)]:
            if all(str(k**n).count(d) ==n for d in '0123456789'):
                a.append(k)
                break
    print(a)
Showing 1-9 of 9 results.