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

A046459 Dudeney numbers: integers equal to the sum of the digits of their cubes.

Original entry on oeis.org

0, 1, 8, 17, 18, 26, 27
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1998

Keywords

Comments

This sequence was first found by the French mathematician Claude (Séraphin) Moret-Blanc in 1879. See Le Lionnais page 27 for the last term of this sequence: 27. - Bernard Schott, Dec 07 2012
The name "Dudeney numbers" appears in the October 2018 issue of Mathematics Teacher (see link). - N. J. A. Sloane, Oct 10 2018

Examples

			a(3) = 8 because 8^3 = 512 and 5 + 1 + 2 = 8.
a(7) = 27 because 27^3 = 19683 and 1 + 9 + 6 + 8 + 3 = 27.
		

References

  • H. E. Dudeney, 536 Puzzles & Curious Problems, reprinted by Souvenir Press, London, 1968, p. 36, #120.
  • Italo Ghersi, Matematica dilettevole e curiosa, p. 115, Hoepli, Milano, 1967. [From Vincenzo Librandi, Jan 02 2009]
  • F. Le Lionnais, Les nombres remarquables, Hermann, 1983.
  • J. Roberts, Lure of the Integers, The Mathematical Association of America, 1992, p. 172.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 96.

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | &+Intseq(n^3) eq n ]; // Vincenzo Librandi, Sep 16 2015
    
  • Mathematica
    Select[Range[0,30],#==Total[IntegerDigits[#^3]]&] (* Harvey P. Dale, Dec 21 2014 *)
  • PARI
    isok(k)=sumdigits(k^3)==k \\ Patrick De Geest, Dec 10 2024
  • Python
    a = [n for n in range(100) if sum(map(int, str(n ** 3))) == n] # David Radcliffe, Aug 18 2022
    

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 09 2013

A046019 a(n) gives the number of different powers m^n for which the sum of the digits is equal to m.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of m >= 1 with m = sum of digits of m^n.

Examples

			a(7)=9 because:
1^7=1
18^7= 612220032 and 6+1+2+2+2+3+2=18
27^7= 10460353203 and 1+4+6+3+5+3+2+3=27
31^7= 27512614111 and 2+7+5+1+2+6+1+4+1+1+1=31
34^7= 52523350144 and 5+2+5+2+3+3+5+1+4+4=34
43^7= 271818611107 and 2+7+1+8+1+8+6+1+1+1+7=43
53^7= 1174711139837 and 1+1+7+4+7+1+1+1+3+9+8+3+7=53
58^7= 2207984167552 and 2+2+7+9+8+4+1+6+7+5+5+2=58
68^7= 6722988818432 and 6+7+2+2+9+8+8+8+1+8+4+3+2=68
a(9)=4 because:
1^9=1
54^9=3904305912313344 and 3+9+4+3+5+9+1+2+3+1+3+3+4+4=54
71^9=45848500718449031 and 4+5+8+4+8+5+7+1+8+4+4+9+3+1=71
81^9=150094635296999121 and 1+5+9+4+6+3+5+2+9+6+9+9+9+1+2+1=81
		

Crossrefs

Cf. A124359, A152147 (table of m such that the sum of digits of m^n equals m)

Formula

a(n) = 1 + A046471(n). - T. D. Noe, Nov 26 2008

Extensions

Examples provided by Paolo P. Lava, Oct 30 2006
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 27 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

A055575 Sum of digits of n^4 is equal to n.

Original entry on oeis.org

0, 1, 7, 22, 25, 28, 36
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			7 is a member because 7^4 = 2401 and 2+4+0+1 = 7.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..50] | &+Intseq(n^4) eq n ]; // Vincenzo Librandi, Feb 23 2015
    
  • Mathematica
    Select[Range[0, 50], #==Total[IntegerDigits[#^4]] &] (* Vincenzo Librandi, Feb 23 2015 *)
  • PARI
    isok(k)=sumdigits(k^4)==k \\ Patrick De Geest, Dec 10 2024
  • Sage
    [n for n in (0..50) if sum((n^4).digits()) == n] # Bruno Berselli, Feb 23 2015
    

A055576 Sum of digits of a(n)^5 is equal to a(n).

Original entry on oeis.org

0, 1, 28, 35, 36, 46
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 28 because 28^5 = 17210368 and 1+7+2+1+0+3+6+8 = 28
		

Crossrefs

Programs

  • Magma
    [n: n in [0..50] | &+Intseq(n^5) eq n ]; // Vincenzo Librandi, Feb 23 2015
  • Mathematica
    Select[Range[0, 60], #==Total[IntegerDigits[#^5]] &] (* Vincenzo Librandi, Feb 23 2015 *)
  • PARI
    lista(nn) = {for (n=0, nn, if (n^5 == sumdigits(n^5)^5, print1(n, ", ")););} \\ Michel Marcus, Feb 23 2015
    

Extensions

Offset changed to 1 by Michel Marcus, Feb 23 2015

A055577 Numbers k such that the sum of digits of k^6 is equal to k.

Original entry on oeis.org

0, 1, 18, 45, 54, 64
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 18 because 18^6 = 34012224 and 3+4+0+1+2+2+2+4 = 18
		

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | &+Intseq(n^6) eq n ]; // Vincenzo Librandi, Feb 23 2015
    
  • Mathematica
    Select[Range[0,100],#==Total[IntegerDigits[#^6]]&] (* Harvey P. Dale, Oct 26 2011 *)
  • PARI
    isok(k)=sumdigits(k^6)==k \\ Patrick De Geest, Dec 13 2024
  • Sage
    [n for n in (0..70) if sum((n^6).digits()) == n] # Bruno Berselli, Feb 23 2015
    

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

A247889 Least number k > 0 such that digsum(n^k) = n, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 13, 0, 4, 0, 0, 4, 3, 3, 4, 0, 0, 7, 0, 0, 7, 5, 4, 0, 0, 0, 13, 0, 0, 7, 0, 6, 5, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 7, 0, 0, 0, 0, 8, 6, 0, 0, 0, 7, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 10, 0, 0, 10, 13, 0, 0, 0, 19, 14, 0, 0, 10, 0, 0, 10, 11, 0, 0
Offset: 0

Views

Author

Derek Orr, Sep 25 2014

Keywords

Comments

a(10^n) = 0 for all n > 0.
a(n) = 0 if and only if n is in A124367, complement of A124359.
The PARI code uses that, if sumdigit(n^k) <> n until sumdigits(n^k) > 2n for the first time, then sumdigits(n^k) <> n for all larger k. This might not be true for all n, although statistically sumdigits(n^k) ~ 4.5*log_10(n')*k within a few % (n' = n with trailing 0's removed), when k is not too small. - M. F. Hasler, May 18 2017

Crossrefs

Cf. A124359 (a(n) > 0), A124367 (a(n) = 0), A007953, A152147.

Programs

  • PARI
    A247889(n,L=2*n)= if(n<10||vecmin(digits(n-1))==9,return(n<10));k=1;while(L >= s=sumdigits(n^k),if(s,return(k));k++) \\ Renamed to A247889 for use in A124359, A124367 (and elsewhere?), and minor edits by M. F. Hasler, May 18 2017
    apply(A247889,[0..100])

Extensions

Data corrected (initial 1 removed, terminal 0 added) by Hans Havermann, Jul 13 2018
Showing 1-10 of 14 results. Next