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-10 of 27 results. Next

A055012 Sum of cubes of the digits of n written in base 10.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 2, 9, 28, 65, 126, 217, 344, 513, 730, 8, 9, 16, 35, 72, 133, 224, 351, 520, 737, 27, 28, 35, 54, 91, 152, 243, 370, 539, 756, 64, 65, 72, 91, 128, 189, 280, 407, 576, 793, 125, 126, 133, 152, 189, 250, 341, 468, 637, 854
Offset: 0

Views

Author

Henry Bottomley, May 31 2000

Keywords

Comments

For n > 1999, a(n) < n. The iteration of this map on n either stops at a fixed point (A046197) or has a period of 2 or 3: {55,250,133}, {136,244}, {160,217,352}, or {919,1459}. - T. D. Noe, Jul 17 2007
A165330 and A165331 give the final value and the number of steps when iterating until a fixed point or cycle is reached. - Reinhard Zumkeller, Sep 17 2009

Crossrefs

Cf. A046197 Fixed points; A046459: integers equal to the sum of the digits of their cubes; A072884: 3rd-order digital invariants: the sum of the cubes of the digits of n equals some number k and the sum of the cubes of the digits of k equals n; A164883: cubes with the property that the sum of the cubes of the digits is also a cube.

Programs

  • Magma
    [0] cat [&+[d^3: d in Intseq(n)]: n in [1..60]]; // Bruno Berselli, Feb 01 2013
    
  • Maple
    A055012 := proc(n)
            add(d^3,d=convert(n,base,10)) ;
    end proc: # R. J. Mathar, Dec 15 2011
  • Mathematica
    Total/@((IntegerDigits/@Range[0,60])^3) (* Harvey P. Dale, Jan 27 2012 *)
    Table[Sum[DigitCount[n][[i]] i^3, {i, 9}], {n, 0, 60}] (* Bruno Berselli, Feb 01 2013 *)
  • PARI
    A055012(n)=sum(i=1,#n=digits(n),n[i]^3) \\ Charles R Greathouse IV, Jul 01 2013
    
  • Python
    def a(n): return sum(map(lambda x: x*x*x, map(int, str(n))))
    print([a(n) for n in range(60)]) # Michael S. Branicky, Jul 13 2022

Formula

a(n) = Sum_{k>=1} (floor(n/10^k) - 10*floor(n/10^(k+1)))^3. - Hieronymus Fischer, Jun 25 2007
a(10n+k) = a(n) + k^3, 0 <= k < 10. - Hieronymus Fischer, Jun 25 2007
From Reinhard Zumkeller, Sep 17 2009: (Start)
a(n) <= 729*A055642(n);
a(A165370(n)) = n and a(m) <> n for m < A165370(n);
a(A031179(n)) = A031179(n);
a(a(A165336(n))) = A165336(n) or a(a(a(A165336(n)))) = A165336(n). (End)
G.f. g(x) = Sum_{k>=0} (1-x^(10^k))*(x^(10^k)+8*x^(2*10^k)+27*x^(3*10^k)+64*x^(4*10^k)+125*x^(5*10^k)+216*x^(6*10^k)+343*x^(7*10^k)+512*x^(8*10^k)+729*x^(9*10^k))/((1-x)*(1-x^(10^(k+1))))
satisfies
g(x) = (x+8*x^2+27*x^3+64*x^4+125*x^5+216*x^6+343*x^7+512*x^8+729*x^9)/(1-x^10) + (1-x^10)*g(x^10)/(1-x). - Robert Israel, Jan 26 2017

Extensions

Edited by M. F. Hasler, Apr 12 2015
Iséki and Stewart links added by Don Knuth, Sep 07 2015

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

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

A035504 Numbers that eventually reach 1 under "x -> sum of cubes of digits of x".

Original entry on oeis.org

1, 10, 100, 112, 121, 211, 778, 787, 877, 1000, 1012, 1021, 1102, 1120, 1189, 1198, 1201, 1210, 1234, 1243, 1324, 1342, 1423, 1432, 1579, 1597, 1759, 1795, 1819, 1891, 1918, 1957, 1975, 1981, 2011, 2101, 2110, 2134, 2143, 2314, 2341, 2413, 2431, 2779
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A016777; a(n) mod 3 = 1; A165330(a(n))=1. [Reinhard Zumkeller, Sep 17 2009]

References

  • R. K. Guy, Unsolved Problems Number Theory, Sect. E34.

Crossrefs

Cf. A007770.
Cf. A046197, A008585, A165333, A165334, A165335; subsequence of A031179.

Programs

  • Mathematica
    f[n_]:=Plus@@(IntegerDigits[n]^3);Trajectory[n_] := Most[NestWhileList[f, n, UnsameQ, All]];Select[Range[2780],Last[Trajectory[#]]==1 &] (* Ant King, May 24 2013 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 31 2000

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

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

Original entry on oeis.org

0, 1, 1741725, 4210818, 9800817, 9926315, 14459929
Offset: 1

Views

Author

Sébastien Dumortier, Nov 05 2006

Keywords

Comments

The sequence "Fixed points for operation of repeatedly replacing a number by the sum of the sixth power of its digits" has just 3 terms: 0, 1, and 548834.
For a d-digit number n >= 10^(d-1), the sum of 7th powers of its digits is <= 9^7*d, therefore these numbers cannot exceed 41205040. - M. F. Hasler, Apr 12 2015

Examples

			1741725 = 1^7 + 7^7 + 4^7 + 1^7 + 7^7 + 2^7 + 5^7.
		

Crossrefs

Programs

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

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

A165331 Number of iterations until a fixed point or cycle is reached when repeatedly replacing a number with the sum of the cubes of its digits.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 17 2009

Keywords

Comments

a(A046197(k)) = 0 for k: 1 <= k <= 6;
a(A046156(k)) = 0 for k: 1 <= k <= 16;
a(A165330(n)) = 0;
a(A165340(n,k)) = n - k, 0<=k<=n.
a(A008585(n)) = A003620(n), n>0. [From Reinhard Zumkeller, Nov 21 2009]

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

Showing 1-10 of 27 results. Next