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 11 results. Next

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

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

A133509 Numbers k such that m=1 is the only number for which the sum of digits of m^k equals m.

Original entry on oeis.org

0, 105, 164, 186, 194, 206, 216, 231, 254, 282, 285, 302, 314, 324, 374, 386, 402, 416, 456, 468, 491, 504, 521, 552, 588, 606, 610, 615, 629, 651, 656, 657, 696, 759, 794, 830, 842, 854, 870, 903, 906, 954, 956, 981, 998, 1029, 1064, 1079, 1082, 1109, 1112, 1131
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 04 2007

Keywords

Crossrefs

Programs

  • Python
    def ok(n):
        d, lim = 1, 1
        while lim < n*9*d: d, lim = d+1, lim*10
        return not any(sum(map(int, str(k**n))) == k for k in range(2, lim+1))
    for k in range(195):
        if ok(k): print(k, end=", ") # Michael S. Branicky, Jul 06 2022

Formula

If t is a term, A046000(t)=1, A046017(t)=0, A046019(t)=1, A046471(t)=0 and A061211(t)=1. - Mohammed Yaseen, Jun 29 2022

Extensions

Description improved by T. D. Noe, Nov 26 2008
Extension by T. D. Noe, Nov 26 2008
Edited by Charles R Greathouse IV, Aug 02 2010
a(1) = 0 and a(46) and beyond from Michael S. Branicky, Jul 06 2022

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

A125526 Numbers k for which the sum of the digits of k raised to the sum of the digits of k itself is equal to k. If "sumdigit" denotes the sum of the digits of a number then these are the numbers k such that k = sumdigit(k^sumdigit(k)).

Original entry on oeis.org

1, 22, 34, 43, 54, 81, 82, 169, 187
Offset: 1

Views

Author

Keywords

Comments

There are no other terms. Proof: Assume the next term has d digits. 10^d > k >= 10^(d-1); sumdigit(k) >= 9d; k^sumdigit(k) < (10^d)^(9d) < 10^(9d^2); 9*(9d^2+1) > sumdigit(k^sumdigit(k)); 9*(9d^2+1) > k 9*(9d^2+1) > 10^(d-1). So d < 5. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Mar 11 2007

Examples

			a(2)=22 because 2 + 2 = 4, 22^4 = 234256, 2 + 3 + 4 + 2 + 5 + 6 = 22.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,k,w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; k:=i^w; w:=0; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; if (i=w) then print(w); fi; od; end: P(200);
    sod := proc(n,b) convert(convert(n,base,b),`+`) end; b:=10: L:=[]: for w to 1 do for n from 1 to 10^3 do x:=sod(n^sod(n,b),b); if x=n then print(n); L:=[op(L),n]; fi; od od; L; # Walter Kehowski, Feb 12 2007
    sd:=proc(n) local nn: nn:=convert(n,base,10): sum(nn[j],j=1..nops(nn)) end: a:=proc(n) if sd(n^sd(n))=n then n else fi end: seq(a(n),n=1..500); # Emeric Deutsch, Feb 16 2007
  • Mathematica
    Select[Range[200],Total[IntegerDigits[#^Total[IntegerDigits[#]]]]==#&] (* Harvey P. Dale, Jul 26 2019 *)

A124365 Numbers that raised to only one specific exponent gives a result for which the sum of its digits is equal to number itself.

Original entry on oeis.org

2, 3, 4, 5, 6, 17, 20, 22, 25, 26, 31, 34, 35, 40, 43, 45, 53, 58, 63, 64, 68, 71, 81, 82, 85, 86, 91, 94, 97, 98, 103, 104, 117
Offset: 1

Views

Author

Keywords

Comments

Subset of A124359

Examples

			31^7=27512614111 and 2+7+5+1+2+6+1+4+1+1+1=31. This is possible only with 7 as exponent.
97^10=73742412689492826049 and 7+3+7+4+2+4+1+2+6+8+9+4+9+2+8+2+6+4+9=97. This is possible only with 10 as exponent.
		

Crossrefs

A124367 Numbers that raised to any exponent do not produce a number whose sum of digits is equal to the initial number.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 19, 21, 23, 24, 29, 30, 32, 33, 37, 38, 39, 41, 42, 44, 47, 48, 49, 50, 51, 52, 55, 56, 57, 59, 60, 61, 62, 65, 66, 67, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 83, 84, 87, 88, 89, 92, 93, 95, 96, 99, 100, 101, 102, 105
Offset: 1

Views

Author

Keywords

Comments

Complement of A124359. Numbers for which A247889 is zero.
Most of the values are conjectural, so far not much is really proved about the function A247889. - M. F. Hasler and Robert Israel, May 18 2017

Crossrefs

Programs

Extensions

106 removed by Robert Israel, May 18 2017

A124366 Consecutive numbers n and (n+1) that raised to the same exponent m produce two numbers for which the sum of their digits gives n and (n+1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 35, 36, 103, 104, 106, 107, 108, 134, 135, 256, 257, 295, 296, 298, 299, 306, 307, 386, 387, 421, 422, 468, 469, 575, 576, 792, 793, 865, 866, 962, 963, 1008, 1009, 1061, 1062, 1476, 1477, 1495, 1496, 2032, 2033, 2376, 2377
Offset: 1

Views

Author

Keywords

Examples

			17^3=4913 (4+9+1+3=17) and 18^3=5832 (5+8+3+2=18)
306^26= 42536043213832457558766474492498614961439017908885402928656941056
(sum of the digits equal to 306) and
307^26= 46301788027092145989912680349353041288862842956233592928809850249
(sum of the digits equal to 307)
		

Crossrefs

A124053 Numbers n that can be expressed as the sum of the digits of both m^k and k^m for distinct numbers m and k which are not both equal to powers of 10.

Original entry on oeis.org

7, 18, 45, 61, 72, 85, 90, 145, 270, 306, 315, 367, 376, 448, 477, 540, 547, 585, 667, 733, 756, 765, 943, 1152, 1377, 1899, 1971, 2106, 2133, 2155, 2215, 2224, 2349, 2628, 2822, 2871, 2968, 3123, 3139, 3181, 3204, 3355, 3546, 3553, 3775, 3780, 4131, 4455
Offset: 1

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Nov 03 2006, Nov 29 2006

Keywords

Comments

If "sumdigit" denotes the sum of the digits of a number then these are the numbers n such that n=sumdigit(m^k)=sumdigit(k^m).
Two banal cases are not considered: 1) m=k because m^k=k^m and the sum of the digits is automatically equal for both the numbers; 2) powers of 10 because sumdigit(10^a)=1 for any integer a. The same number can be generated by different pairs: 477 cames from sumdigit(54^63)=sumdigit(63^54) and sumdigit(90^120)=sumdigit(120^90) 2349 cames from sumdigit(216^222)=sumdigit(222^216), sumdigit(216^225)=sumdigit(225^216) and sumdigit(219^222)=sumdigit(222^219)

Examples

			270 = sumdigit(36^39) = sumdigit(39^36);
1152 = sumdigit(114^126) = sumdigit(126^114);
2133 = sumdigit(204^213) = sumdigit(213^204).
		

Crossrefs

Programs

  • Maple
    P:=proc(n)local i,j,k,w,x,y; for i from 1 by 1 to n do for j from 1 by 1 to n do w:=0; x:=0; k:=i^j; y:=j^i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; while y>0 do x:=x+y-trunc(y/10)*10; y:=trunc(y/10); od; if (w=x) and (w<>1) and (i
    				

A355563 a(n) is the number of numbers that divide the sum of the digits of their n-th powers.

Original entry on oeis.org

1, 9, 4, 9, 9, 7, 10, 14, 10, 12, 13, 10, 12, 19, 11, 15, 14, 15, 14, 16, 14, 13, 14, 12, 11, 23, 13, 11, 17, 15, 10, 16, 18, 18, 10, 13, 10, 17, 15, 16, 19, 12, 20, 19, 20, 17, 19, 21, 14, 27, 15, 18, 16, 16, 20, 10, 14, 20, 15, 11, 17, 23, 14, 15, 14, 19, 15
Offset: 0

Views

Author

Mohammed Yaseen, Jul 07 2022

Keywords

Comments

Row lengths of A355370.

Crossrefs

Programs

  • Python
    def ok(k, n): return sum(map(int, str(k**n)))%k==0
    def a(n):
        d, lim = 1, 1
        while lim < n*9*d: d, lim = d+1, lim*10
        return sum(1 for k in range(1, lim+1) if ok(k, n))
    print([a(n) for n in range(67)]) # Michael S. Branicky, Jul 07 2022
Showing 1-10 of 11 results. Next