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.

A152147 Irregular triangle in which row n lists k > 0 such that the sum of digits of k^n equals k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 9, 1, 8, 17, 18, 26, 27, 1, 7, 22, 25, 28, 36, 1, 28, 35, 36, 46, 1, 18, 45, 54, 64, 1, 18, 27, 31, 34, 43, 53, 58, 68, 1, 46, 54, 63, 1, 54, 71, 81, 1, 82, 85, 94, 97, 106, 117, 1, 98, 107, 108, 1, 108, 1, 20, 40, 86, 103, 104, 106, 107, 126, 134, 135
Offset: 1

Views

Author

T. D. Noe, Nov 26 2008

Keywords

Comments

Each row begins with 1 and has length A046019(n).

Examples

			1, 2, 3, 4, 5, 6, 7, 8, 9;
1, 9;
1, 8, 17, 18, 26, 27;              (A046459, with 0)
1, 7, 22, 25, 28, 36;              (A055575    "   )
1, 28, 35, 36, 46;                 (A055576    "   )
1, 18, 45, 54, 64;                 (A055577    "   )
1, 18, 27, 31, 34, 43, 53, 58, 68; (A226971    "   )
1, 46, 54, 63;
1, 54, 71, 81,
1, 82, 85, 94, 97, 106, 117,
1, 98, 107, 108, etc.
		

Crossrefs

Programs

  • Python
    def ok(k, r): return sum(map(int, str(k**r))) == k
    def agen(rows, startrow=1, withzero=0):
      for r in range(startrow, rows + startrow):
        d, lim = 1, 1
        while lim < r*9*d: d, lim = d+1, lim*10
        yield from [k for k in range(1-withzero, lim+1) if ok(k, r)]
    print([an for an in agen(13)]) # Michael S. Branicky, May 23 2021

A061211 Largest number m such that m is the n-th power of the sum of its digits.

Original entry on oeis.org

9, 81, 19683, 1679616, 205962976, 68719476736, 6722988818432, 248155780267521, 150094635296999121, 480682838924478847449, 23316389970546096340992, 2518170116818978404827136, 13695791164569918553628942336, 4219782742781494680756610809856
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2001

Keywords

Comments

Clearly m = 1 always works, so a(n) exists for all n. - Farideh Firoozbakht, Nov 23 2007
105 is the smallest number n such that a(n)=1. This means that if n<105 there exists at least one number m greater than 1 such that m is the n-th power of the sum of its digits while 1 is the only number m such that m is the 105th power of the sum of its digits. A133509 gives n such that a(n) = 1. - Farideh Firoozbakht, Nov 23 2007

Examples

			a(3) = 19683 = 27^3 and no bigger number can have this property. (This has been established in the Murthy reference.)
a(4) = 1679616 = (1+6+7+9+6+1+6)^4 = 36^4.
		

References

  • Amarnath Murthy, The largest and the smallest m-th power whose digits sum /product is its m-th root. To appear in Smarandache Notions Journal.
  • Amarnath Murthy, e-book, "Ideas on Smarandache Notions", manuscript.

Crossrefs

Programs

  • Mathematica
    meanDigit = 9/2; translate = 900; upperm[1] = translate;
    upperm[n_] := Exp[-ProductLog[-1, -Log[10]/(meanDigit*n)]] + translate;
    a[n_] := (For[max = m = 1, m <= upperm[n], m++, If[m == Total[ IntegerDigits[ m^n ] ], max = m]]; max^n);
    Array[a, 14] (* Jean-François Alcover, Jan 09 2018 *)

Extensions

More terms from Ulrich Schimke, Feb 11 2002
Edited by N. J. A. Sloane at the suggestion of Farideh Firoozbakht, Dec 04 2007

A046017 Least k > 1 with k = sum of digits of k^n, or 0 if no such k exists.

Original entry on oeis.org

2, 9, 8, 7, 28, 18, 18, 46, 54, 82, 98, 108, 20, 91, 107, 133, 80, 172, 80, 90, 90, 90, 234, 252, 140, 306, 305, 90, 305, 396, 170, 388, 170, 387, 378, 388, 414, 468, 449, 250, 432, 280, 461, 280, 360, 360, 350, 370, 270, 685, 360, 625, 648, 370, 677, 684, 370, 667, 370, 694, 440, 855, 827, 430, 818
Offset: 1

Views

Author

Keywords

Comments

First non-occurrence happens with exponent 105. There is no x such that sum-of-digits{x^105}=x (x>1). - Patrick De Geest, Aug 15 1998

Examples

			a(3) = 8 since 8^3 = 512 and 5+1+2 = 8; a(5) = 28 because 28 is least number > 1 with 28^5 = 17210368, 1+7+2+1+0+3+6+8 = 28. 53^7 = 1174711139837 -> 1+1+7+4+7+1+1+1+3+9+8+3+7 = 53.
a(10) = 82 because 82^10 = 13744803133596058624 and 1 + 3 + 7 + 4 + 4 + 8 + 0 + 3 + 1 + 3 + 3 + 5 + 9 + 6 + 0 + 5 + 8 + 6 + 2 + 4 = 82.
a(13) = 20: 20^13=81920000000000000, 8+1+9+2=20.
a(17) = 80: 80^17=225179981368524800000000000000000, 2+2+5+1+7+9+9+8+1+3+6+8+5+2+4+8 = 80.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 208-210.
  • Joe Roberts, "Lure of the Integers", The Mathematical Association of America, 1992, p. 172.

Crossrefs

Cf. A133509 (n for which a(n)=0), A152147 (table of k for each n).

Programs

  • Mathematica
    a[n_] := For[k = 2, k <= 20*n, k++, Which[k == Total[IntegerDigits[k^n]], Return[k], k == 20*n, Return[0]]]; Table[a[n] , {n, 1, 105}] (* Jean-François Alcover, May 23 2012 *)
    sdk[n_]:=Module[{k=2},While[k!=Total[IntegerDigits[k^n]],k++];k]; Array[sdk,70] (* Harvey P. Dale, Jan 07 2024 *)
  • Python
    from itertools import chain
    def c(k, n): return sum(map(int, str(k**n))) == k
    def a(n):
        if n == 0: return False
        d, lim = 1, 1
        while lim < n*9*d: d, lim = d+1, lim*10
        m = next(k for k in chain(range(2, lim+1), (0,)) if c(k, n))
        return m
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Jul 06 2022

Extensions

More terms from Asher Auel, Jun 01 2000

A046000 a(n) is the largest number m equal to the sum of digits of m^n.

Original entry on oeis.org

1, 9, 9, 27, 36, 46, 64, 68, 63, 81, 117, 108, 108, 146, 154, 199, 187, 216, 181, 207, 207, 225, 256, 271, 288, 337, 324, 307, 328, 341, 396, 443, 388, 423, 463, 477, 424, 495, 469, 523, 502, 432, 531, 572, 603, 523, 592, 666, 667, 695, 685, 685, 739, 746, 739, 683, 684, 802, 754, 845, 793, 833, 865
Offset: 0

Views

Author

David W. Wilson and Patrick De Geest

Keywords

Comments

Cases a(n) = 1 begin: 0, 105, 164, 186, 194, 206, 216, 231, 254, 282, 285, ... Cf. A133509. - Jean-François Alcover, Jan 09 2018

Examples

			a(3) = 27 because 27 is the largest number with 27^3 = 19683 and 1+9+6+8+3 = 27.
a(5) = 46 because 46 is the largest number with 46^5 = 205962976 and 2+0+5+9+6+2+9+7+6 = 46.
		

References

  • Amarnath Murthy, The largest and the smallest m-th power whose digits sum /product is its m-th root. To appear in Smarandache Notions Journal, 2003.
  • Amarnath Murthy, e-book, "Ideas on Smarandache Notions" MS.LIT
  • Joe Roberts, "Lure of the Integers", The Mathematical Association of America, 1992, p. 172.

Crossrefs

Programs

  • Mathematica
    meanDigit = 9/2; translate = 900; upperm[1] = translate;
    upperm[n_] := Exp[-ProductLog[-1, -Log[10]/(meanDigit*n)]] + translate;
    (* assuming that upper bound of m fits the implicit curve m = Log[10, m^n]*9/2 *)
    a[0] = 1; a[n_] := (For[max = m = 0, m <= upperm[n], m++, If[m == Total[IntegerDigits[m^n]], max = m]]; max);
    Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Jan 09 2018, updated Jul 07 2022 *)
  • Python
    def ok(k, n): return sum(map(int, str(k**n))) == k
    def a(n):
        d, lim = 1, 1
        while lim < n*9*d: d, lim = d+1, lim*10
        return next(k for k in range(lim, 0, -1) if ok(k, n))
    print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 06 2022

Formula

a(n) = A061211(n)^(1/n), for n > 0.

Extensions

More terms from Asher Auel, Jun 01 2000
More terms from Franklin T. Adams-Watters, Sep 01 2006
Edited by N. J. A. Sloane at the suggestion of David Wasserman, Dec 12 2007

A046471 Number of numbers k>1 such that k equals the sum of digits in k^n.

Original entry on oeis.org

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

Views

Author

Patrick De Geest, Aug 15 1998

Keywords

Comments

The number of digits in k^n is at most 1+n*log(k). Hence the maximum sum of digits of k^n is 9(1+n*log(k)). By solving k=9(1+n*log(k)), we can compute an upper bound on k for each n. Sequence A133509 lists the n for which a(n)=0.

Examples

			a(17)=4 -> sum-of-digits{x^17}=x for x=80,143,171 and 216 (x>1).
		

References

  • Joe Roberts, "Lure of the Integers", The Mathematical Association of America, 1992, p. 172.

Crossrefs

a(n) = A046019(n) - 1.
Cf. A152147 (table of k such that the sum of digits of k^n equals k)

Extensions

Edited by T. D. Noe, Nov 25 2008

A353159 Integers k for which there exists some integer m such that the sum of the digits of m^k is equal to m + k.

Original entry on oeis.org

2, 3, 6, 9, 12, 15, 18, 20, 21, 24, 27, 30, 33, 36, 38, 39, 42, 45, 48, 51, 54, 56, 57, 63, 66, 69, 72, 74, 75, 78, 81, 84, 87, 90, 92, 93, 96, 99, 102, 105, 108, 110, 111, 114, 117, 120, 123, 126, 129, 132, 135, 141, 144, 146, 147, 150, 153, 156, 159, 162
Offset: 1

Views

Author

Samuel Owen, Apr 27 2022

Keywords

Comments

Letting t = m^k, this sequence consists of the integers k for which there exists some integer m such that s(t) = m + k, where s(t) = A007953(t) represents the sum of digits of t. Rearranging gives m = t^(1/k) = s(t) - k; this allows you to find numbers which follow a common online trick like 64^(1/2) = (6 + 4) - 2 or 216^(1/3) = (2 + 1 + 6) - 3. This online trick was the original motivation for this sequence.

Examples

			s(62^9) = 62 + 9, so 9 is a term.
s(2157^156) = 2157 + 156, so 156 is a term.
s(18045^999) = 18045 + 999,  so 999 is a term.
		

Crossrefs

Formula

For any given k, the value of m is bounded by 0 < m < x, where x is the maximum solution to the equation x = 10^(1/k)*k*floor(9*log_10(x)-1).

A379767 Triangle read by rows: row n lists numbers which are the n-th powers of their digit sum.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 81, 0, 1, 512, 4913, 5832, 17576, 19683, 0, 1, 2401, 234256, 390625, 614656, 1679616, 0, 1, 17210368, 52521875, 60466176, 205962976, 0, 1, 34012224, 8303765625, 24794911296, 68719476736, 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432
Offset: 1

Views

Author

René-Louis Clerc, Jan 02 2025

Keywords

Comments

Each row begins with 0, 1. Solutions can have no more than R(n) digits, since (R(n)*9)^n < 10^R(n), hence, for each n, there are a finite number of solutions (Property 1 and table 1 of Clerc).

Examples

			Triangle begins:
  1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
  2 | 0, 1, 81;
  3 | 0, 1, 512, 4913, 5832, 17576, 19683;
  4 | 0, 1, 2401, 234256, 390625, 614656, 1679616;
  5 | 0, 1, 17210368, 52521875, 60466176, 205962976;
  6 | 0, 1, 34012224, 8303765625, 24794911296, 68719476736;
  7 | 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432;
  8 | 0, 1, 20047612231936, 72301961339136, 248155780267521;
  9 | 0, 1, 3904305912313344, 45848500718449031, 150094635296999121;
  ...
		

Crossrefs

Rows 3..6 are A061209, A061210, A254000, A375343.
Row lengths are 1 + A046019(n).
Cf. A001014, A007953, A061211 (largest terms), A133509.
Cf. A152147.

Programs

  • PARI
    R(n) = for(j=2,oo, if((j*9)^n <10^j, return(j)));
    row(n) = my(L=List()); for (k=0, sqrtnint(10^R(n),n), if (k^n == sumdigits(k^n)^n, listput(L, k^n))); Vec(L)
Showing 1-7 of 7 results.