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 10 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

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

A055565 Sum of digits of n^4.

Original entry on oeis.org

0, 1, 7, 9, 13, 13, 18, 7, 19, 18, 1, 16, 18, 22, 22, 18, 25, 19, 27, 10, 7, 27, 22, 31, 27, 25, 37, 18, 28, 25, 9, 22, 31, 27, 25, 19, 36, 28, 25, 18, 13, 31, 27, 25, 37, 18, 37, 43, 27, 31, 13, 27, 25, 37, 27, 28, 43, 18, 31, 22, 18, 34, 37, 36, 37, 34, 45, 13, 31, 27, 7
Offset: 0

Views

Author

Henry Bottomley, Jun 19 2000

Keywords

Examples

			a(2) = 7 because 2^4 = 16 and 1+6 = 7.
		

Crossrefs

Cf. A000583, A007953, A055570, A055575 (fixed points), A373914.

Programs

  • Maple
    for i from 0 to 200 do printf(`%d,`,add(j, j=convert(i^4, base, 10))) od;
  • Mathematica
    a[n_Integer]:=Apply[Plus, IntegerDigits[n^4]]; Table[a[n], {n, 0, 100}] (* Vincenzo Librandi, Feb 23 2015 *)
  • PARI
    a(n) = sumdigits(n^4); \\ Seiichi Manyama, Nov 16 2021
  • Sage
    [sum((n^4).digits()) for n in (0..70)] # Bruno Berselli, Feb 23 2015
    

Formula

a(n) = A007953(A000583(n)). - Michel Marcus, Feb 23 2015

Extensions

More terms from James Sellers, Jul 04 2000

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

A281915 4th power analog of Keith numbers.

Original entry on oeis.org

1, 7, 19, 20, 22, 25, 28, 36, 77, 107, 110, 175, 789, 1528, 1932, 3778, 5200, 7043, 8077, 38855, 41234, 44884, 49468, 204386, 763283, 9423515, 73628992, 87146144, 146124072, 146293356, 326194628, 1262293219, 1321594778, 2767787511, 11511913540, 12481298961, 13639550655
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^4 digits to reach n.
Consider the digits of n^4. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			175^4 = 937890625:
9 + 3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 = 49;
3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 = 89;
7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 + 89 = 175.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281915[n_] := Join[{1, 7}, Select[Range[10, n], keithQ[#, 4]&]]
    a281915[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)

Extensions

a(27)-a(28) from Jinyuan Wang, Jan 30 2020
Missing a(25) and a(29)-a(37) from Giovanni Resta, Jan 31 2020

A055570 Sum of digits of (a(n)^4) is greater than or equal to a(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 28, 36
Offset: 0

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 2 because 2^4 = 16 and 1+6 = 7>= 2
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,50],Total[IntegerDigits[#^4]]>=#&] (* Harvey P. Dale, Jan 20 2020 *)

Extensions

Definition clarified by Harvey P. Dale, Jan 20 2020

A226971 Numbers k such that the sum of digits of k^7 is equal to k.

Original entry on oeis.org

0, 1, 18, 27, 31, 34, 43, 53, 58, 68
Offset: 1

Views

Author

Michel Lagneau, Jun 24 2013

Keywords

Comments

Only the ten integers listed have this property.

Examples

			a(3) = 18 because 18^7 = 612220032 and 6+1+2+2+2+0+0+3+2 = 18.
		

Crossrefs

Programs

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

A337356 Numbers whose digit sum of their square is equal to their square root.

Original entry on oeis.org

0, 1, 49, 484, 625, 784, 1296
Offset: 1

Views

Author

Evzen Stejskal, Aug 24 2020

Keywords

Crossrefs

Cf. A055575.

Programs

  • Mathematica
    Select[Range[0, 36], Plus @@ IntegerDigits[#^4] == # &]^2 (* Amiram Eldar, Sep 08 2020 *)

Formula

a(n) = A055575(n)^2. - Joerg Arndt, Sep 01 2020
Showing 1-10 of 10 results.