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.

A023052 Perfect Digital Invariants: numbers that are the sum of some fixed power of their digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 4150, 4151, 8208, 9474, 54748, 92727, 93084, 194979, 548834, 1741725, 4210818, 9800817, 9926315, 14459929, 24678050, 24678051, 88593477, 146511208, 472335975, 534494836, 912985153
Offset: 1

Views

Author

Keywords

Comments

The old name was "Powerful numbers, definition (3)". Cf. A001694, A007532. - N. J. A. Sloane, Jan 16 2022.
Randle has suggested that these numbers be called "powerful", but this usually refers to a distinct property related to prime factorization, cf. A001694, A036966, A005934.
Numbers m such that m = Sum_{i=1..k} d(i)^s for some s, where d(1..k) are the decimal digits of m.
Superset of A005188 (Plusperfect, narcissistic or Armstrong numbers: s=k), A046197 (s=3), A052455 (s=4), A052464 (s=5), A124068 (s=6, 7), A124069 (s=8). - R. J. Mathar, Jun 15 2009, Jun 22 2009

Examples

			153 = 1^3 + 5^3 + 3^3, 4210818 = 4^7 + 2^7 + 1^7 + 0^7 + 8^7 + 1^7 + 8^7.
		

Crossrefs

Cf. A001694 (powerful numbers: p|n => p^2|n), A005934 (highly powerful numbers).
Cf. A005188 (here the power must be equal to the number of digits).
In other bases: A162216 (base 3), A162219 (base 4), A162222 (base 5), A162225 (base 6), A162228 (base 7), A162231 (base 8), A162234 (base 9).

Programs

  • Mathematica
    Select[Range[0, 10^5], Function[m, AnyTrue[Function[k, Total@ Map[Power[#, k] &, IntegerDigits@ m]] /@ Range@ 10, # == m &]]] (* Michael De Vlieger, Feb 08 2016, Version 10 *)
  • PARI
    is(n)=if(n<10, return(1)); my(d=digits(n),m=vecmax(d)); if(m<2, return(0)); for(k=3,logint(n,m), if(sum(i=1,#d,d[i]^k)==n, return(1))); 0 \\ Charles R Greathouse IV, Feb 06 2017
    
  • PARI
    select( is_A023052(n,b=10)={nn|| return(t==n))}, [0..10^5]) \\  M. F. Hasler, Nov 21 2019

Extensions

Computed to 10^50 by G. N. Gusev (GGN(AT)rm.yaroslavl.ru)
Computed to 10^74 by Xiaoqing Tang
A-number typo corrected by R. J. Mathar, Jun 22 2009
Computed to 10^105 by Joseph Myers
Cross-references edited by Joseph Myers, Jun 28 2009
Edited by M. F. Hasler, Nov 21 2019

A046197 Fixed points for operation of repeatedly replacing a number with the sum of the cubes of its digits.

Original entry on oeis.org

0, 1, 153, 370, 371, 407
Offset: 1

Views

Author

Richard C. Schroeppel

Keywords

Comments

Suppose n has d digits; then the sum of the cubes of its digits is <= 729d and n >= 10^(d-1). So d <= 5. It is now easy to check that the numbers shown are the only solutions. [Corrected by M. F. Hasler, Apr 12 2015]
This is row n=3 of A252648. - M. F. Hasler, Apr 12 2015

Examples

			1^3 + 5^3 + 3^3 = 153. 3^3+7^3 +0^3 = 370.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 153, p. 50, Ellipses, Paris 2008.
  • G. H. Hardy, A Mathematician's Apology, Cambridge, 1967.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 60-62.
  • J. Shallit, Number theory and formal languages, in Emerging applications of number theory (Minneapolis, MN, 1996), 547-570, IMA Vol. Math. Appl., 109, Springer, New York, 1999.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 140.

Crossrefs

Programs

  • Mathematica
    Select[Range[0,407],Total[IntegerDigits[#]^3]==# &] (* Stefano Spezia, Sep 08 2024 *)
  • PARI
    for(n=0,10^5,A055012(n)==n&&print1(n",")) \\ M. F. Hasler, Apr 12 2015

Formula

A055012(a(n))=a(n); A165331(a(n))=0; subset of A031179. - Reinhard Zumkeller, Sep 17 2009

A252648 Irregular table of perfect digital invariants for n > 1, i.e., numbers equal to the sum of n-th powers of their digits, read by rows.

Original entry on oeis.org

1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 0, 1, 153, 370, 371, 407, 0, 1, 1634, 8208, 9474, 0, 1, 4150, 4151, 54748, 92727, 93084, 194979, 0, 1, 548834, 0, 1, 1741725, 4210818, 9800817, 9926315, 14459929, 0, 1, 24678050, 24678051, 88593477, 0, 1, 146511208, 472335975, 534494836, 912985153, 0, 1, 4679307774
Offset: 0

Views

Author

Derek Orr, Dec 19 2014

Keywords

Comments

The third column is listed in A003321. - M. F. Hasler, Feb 16 2015
For a number x >= 10^(d-1) with d digits, the sum of n-th powers of these digits cannot exceed d*9^n. Therefore there is only a finite number of possible perfect digital invariants for any n, the largest of which has at most d* digits, where d* = 1+(n*log(9)+log d*)/log(10). - M. F. Hasler, Apr 14 2015

Examples

			The table starts:
1; (n = 0; 1 = 1^0.)
0, 1, 2, 3, 4, 5, 6, 7, 8, 9; (n = 1)
0, 1; (n = 2)
0, 1, 153, 370, 371, 407; (n = 3, A046197)
0, 1, 1634, 8208, 9474; (n = 4, A052455)
0, 1, 4150, 4151, 54748, 92727, 93084, 194979; (n = 5, A052464)
0, 1, 548834; (n = 6)
0, 1, 1741725, 4210818, 9800817, 9926315, 14459929; (n = 7, A124068)
0, 1, 24678050, 24678051, 88593477; (n = 8, A124069)
0, 1, 146511208, 472335975, 534494836, 912985153; (n = 9, A226970)
The third column corresponds to A003321.
The term 153 is member of the row n=3 because 153 = 1^3 + 5^3 + 3^3. - _M. F. Hasler_, Apr 14 2015
		

Crossrefs

Programs

  • PARI
    row(n)={m=1;while(m*9^n>=10^m,m++);for(k=1,10^m,sum(i=1,#d=digits(k),d[i]^n)==k && print1(k,", "))}
    for(n=0,7,print1(row(n),", "))
    
  • Python
    from itertools import combinations_with_replacement
    A252648_list = [1]
    for m in range(1,21):
        l, L, dm, xlist, q = 1, 1, [d**m for d in range(10)], [0], 9**m
        while l*q >= L:
            for c in combinations_with_replacement(range(1,10),l):
                n = sum(dm[d] for d in c)
                if sorted(int(d) for d in str(n)) == [0]*(len(str(n))-len(c))+list(c):
                    xlist.append(n)
            l += 1
            L *= 10
        A252648_list.extend(sorted(xlist)) # Chai Wah Wu, Jan 04 2016

Extensions

I added two links. - Don Knuth, Sep 10 2015

A052455 Fixed points for operation of repeatedly replacing a number with the sum of the fourth power of its digits.

Original entry on oeis.org

0, 1, 1634, 8208, 9474
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2000

Keywords

Comments

This is row n=4 in A252648. - M. F. Hasler, Apr 12 2015

Examples

			a(2)=1634 since 1^4+6^4+3^4+4^4=1+1296+81+256=1634
		

Crossrefs

Programs

Formula

a(n) = A055013(a(n)). - M. F. Hasler, Apr 12 2015

A052464 Fixed points for operation of repeatedly replacing a number with the sum of the fifth power of its digits.

Original entry on oeis.org

0, 1, 4150, 4151, 54748, 92727, 93084, 194979
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2000

Keywords

Comments

Equivalently, numbers equal to the sum of 5th powers of their decimal digits. Since this sum is <= 9^5*d for a d-digit number n >= 10^(d-1), there cannot be such a number with more than 6 digits. - M. F. Hasler, Apr 12 2015

Examples

			a(2) = 4150 since 4^5 + 1^5 + 5^5 + 0^5 = 1024 + 1 + 3125 + 0 = 4150.
		

Crossrefs

Programs

A124069 Fixed points for operation of repeatedly replacing a number with the sum of the eighth power of its digits.

Original entry on oeis.org

0, 1, 24678050, 24678051, 88593477
Offset: 1

Views

Author

Sébastien Dumortier, Nov 05 2006

Keywords

Comments

This is row n=8 of A252648. For a d-digit number n >= 10^(d-1), the sum of 8th powers of its digits is <= 9^8*d, therefore n <= 413979400. - M. F. Hasler, Apr 12 2015

Examples

			24678050 = 2^8 + 4^8 + 6^8 + 7^8 + 8^8 + 0^8 + 5^8 + 0^8.
		

Crossrefs

Programs

  • PARI
    isok(n) = my(d = digits(n)); sum(k=1, #d, d[k]^8) == n; \\ Michel Marcus, Feb 21 2015
    
  • PARI
    for(n=0,413979400,A210840(n)==n&&print1(n",")) \\ M. F. Hasler, Apr 12 2015

Formula

a(n) = A210840(a(n)). - M. F. Hasler, Apr 12 2015

A226970 Fixed points for the operation of repeatedly replacing a number with the sum of the ninth powers of its digits.

Original entry on oeis.org

0, 1, 146511208, 472335975, 534494836, 912985153
Offset: 1

Views

Author

Michel Lagneau, Jun 24 2013

Keywords

Comments

The only six integers equal to the sum of the ninth powers of their digits.
This is row n=9 of A252648. For a d-digit number n >= 10^(d-1), the sum of 9th powers of its digits is <= 9^9*d, therefore n <= 4112105981. - M. F. Hasler, Apr 12 2015

Examples

			a(3) = A003321(9);
a(4) = 472335975 = 4^9 + 7^9 + 2^9 + 3^9 + 3^9 + 5^9 + 9^9 + 7^9 + 5^9.
		

Crossrefs

Programs

A123253 Sum of 7th powers of digits of n.

Original entry on oeis.org

0, 1, 128, 2187, 16384, 78125, 279936, 823543, 2097152, 4782969, 1, 2, 129, 2188, 16385, 78126, 279937, 823544, 2097153, 4782970, 128, 129, 256, 2315, 16512, 78253, 280064, 823671, 2097280, 4783097, 2187, 2188, 2315, 4374, 18571, 80312, 282123
Offset: 0

Views

Author

Zerinvary Lajos, Nov 06 2006

Keywords

Comments

Fixed points are listed in A124068 = row n=7 of A252648. - M. F. Hasler, Apr 12 2015

Crossrefs

Programs

  • Magma
    [0] cat [&+[d^7: d in Intseq(n)]: n in [1..40]]; // Bruno Berselli, Feb 01 2013
    
  • Maple
    A123253 := proc(n)
            add(d^7,d=convert(n,base,10)) ;
    end proc: # R. J. Mathar, Jan 16 2013
  • Mathematica
    Table[Sum[DigitCount[n][[i]] i^7, {i, 9}], {n, 0, 40}] (* Bruno Berselli, Feb 01 2013 *)
  • PARI
    A123253(n)=sum(i=1,#n=digits(n),n[i]^7) \\ M. F. Hasler, Apr 12 2015

A255668 Number of perfect digital invariants of order n, i.e., numbers equal to the sum of n-th powers of their digits.

Original entry on oeis.org

1, 10, 2, 6, 5, 8, 3, 7, 5, 6, 3, 10, 2, 3, 3, 2, 4, 6, 2, 6, 3, 4, 2, 7, 5, 10, 2, 9, 2, 9, 2, 6, 3, 5, 3, 6, 3, 5, 5, 7, 2, 2, 4, 9, 6, 9, 5, 7, 2, 3, 2, 4, 2, 3, 6, 4, 5, 4, 2, 4, 4, 4, 3, 7, 3, 6, 3, 4, 3, 3, 4, 3, 4, 5, 3, 4, 5, 5, 3, 3, 2, 3, 2, 4, 3, 8, 3, 5, 2, 7, 3
Offset: 0

Views

Author

M. F. Hasler, Apr 14 2015

Keywords

Comments

Row lengths of the table A252648.
For a number with d digits, the sum of n-th powers cannot exceed d*9^n, but the number is not less than 10^(d-1). Therefore there is only a finite number of possible perfect digital invariants for any n, the largest of which has at most d* digits, where d* = 1+(n*log(9)+log d*)/log(10).

Examples

			a(0)=1 because 1 is the only number equal to the sum of 0th powers of its digits.
a(1)=10 because { 0, 1, ... 9 } are the only numbers equal to the sum of their digits (taken to the power 1).
a(2)=2 because 0 and 1 are the only numbers equal to the sum of the squares of their digits.
a(3)=6 because { 0, 1, 153, 370, 371, 407 } is the set of all numbers equal to the sum of the 3rd powers of their digits, cf. A046197.
For more examples, see the table A252648.
		

Crossrefs

Programs

  • Mathematica
    Reap@ For[n = 0, n < 6, n++, Sow@ Length@ Select[Range[0, 10^(n + 1)], Plus @@ (IntegerDigits[#]^n) == # &]] // Flatten // Rest (* Michael De Vlieger, Apr 14 2015 *)

Formula

a(n) >= 2 for all n > 0, since 0 and 1 are digital invariants for any power n > 0.

Extensions

a(10)-a(90) from Don Knuth, Sep 09 2015
Showing 1-9 of 9 results.