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

A114258 Numbers k such that k^2 contains exactly 2 copies of each digit of k.

Original entry on oeis.org

72576, 406512, 415278, 494462, 603297, 725760, 3279015, 4065120, 4152780, 4651328, 4915278, 4927203, 4944620, 4972826, 4974032, 4985523, 4989323, 5002245, 5016125, 6032970, 6214358, 6415002, 6524235, 7257600, 9883667
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

From Chai Wah Wu, Feb 27 2024: (Start)
If k is a term, then k == 0 (mod 9) or k == 2 (mod 9) (see A370676).
First decimal digit of each term is 3 or larger. (End)

Examples

			72576 is in the sequence since its square 5267275776 contains four 7's, two 2's, two 5's and two 6's.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from itertools import count, islice
    def A114258_gen(): # generator of terms
        for l in count(1):
            a = isqrt(10**((l<<1)-1))
            if (a9:=a%9):
                a -= a9
            for b in range(a,10**l,9):
                for c in (0,2):
                    k = b+c
                    if sorted(str(k)*2)==sorted(str(k**2)):
                        yield k
    A114258_list = list(islice(A114258_gen(),20)) # Chai Wah Wu, Feb 27 2024

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 *)

A114259 Numbers k such that k^3 contains exactly 3 copies of each digit of k.

Original entry on oeis.org

87624375, 88236519, 516473892, 569784132, 576283194, 623837409, 652319574, 726918453, 751396842, 865917402, 876243750, 882365190, 908714352, 984052317, 996302784, 4680215379, 4721985066, 4752360918, 4765380219, 4780620591, 4816217505, 4823206911, 4857619623
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

All terms are divisible by 3. - Chai Wah Wu, Feb 27 2024

Examples

			87624375 is in the sequence since its cube 672782675854638427734375 contains three 8's, six 7's, three 6's and so on.
		

Crossrefs

A114261 Numbers k such that the 5th power of k contains exactly 5 copies of each digit of k.

Original entry on oeis.org

961527834, 7351062489, 8105632794, 8401253976, 8731945026, 9164072385, 9238750614, 9615278340, 9847103256, 72308154699, 73510624890, 81056327940, 83170652949, 83792140506, 84012539760, 87319450260, 91602408573, 91640723850, 92387506140, 96152783400, 98471032560
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

Some of the early terms of the sequence are also pandigital, i.e. they contain all the 10 digits once. This is probably accidental, but quite curious!
All terms are divisible by 9. First decimal digit of a term is 6 or larger. - Chai Wah Wu, Feb 27 2024

Examples

			E.g. 961527834 is in the sequence since its 5th power 821881685441327565743977956591832631269739424 contains five 9's, five 6's, five 1's and so on.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import integer_nthroot
    def A114261_gen(): # generator of terms
        for l in count(1):
            a = integer_nthroot(10**(5*l-1),5)[0]
            if (a9:=a%9):
                a += 9-a9
            for b in range(a,10**l,9):
                if sorted(str(b)*5)==sorted(str(b**5)):
                    yield b
    A114261_list = list(islice(A114261_gen(),5)) # Chai Wah Wu, Feb 27 2024

Extensions

a(8)-a(9) from Ray Chandler, Aug 23 2023
a(10)-a(21) from Chai Wah Wu, Feb 28 2024

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 *)
Showing 1-7 of 7 results.