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-9 of 9 results.

A055566 Sum of digits of n^5.

Original entry on oeis.org

0, 1, 5, 9, 7, 11, 27, 22, 26, 27, 1, 14, 27, 25, 29, 36, 31, 35, 45, 37, 5, 18, 25, 29, 36, 40, 35, 36, 28, 23, 9, 34, 29, 36, 31, 35, 36, 46, 41, 36, 7, 29, 27, 31, 35, 36, 46, 32, 45, 43, 11, 27, 22, 44, 36, 37, 41, 36, 52, 47, 27, 40, 35, 45, 37, 32, 36, 25, 47, 36, 22, 35
Offset: 0

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 5 because 2^4 = 32 and 3+2 = 5.
Trajectories under the map x->a(x):
1 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->..
2 ->5 ->11 ->14 ->29 ->23 ->29 ->23 ->29 ->..
3 ->9 ->27 ->36 ->36 ->36 ->36 ->36 ->36 ->..
4 ->7 ->22 ->25 ->40 ->7 ->22 ->25 ->40 ->..
5 ->11 ->14 ->29 ->23 ->29 ->23 ->29 ->23 ->..
6 ->27 ->36 ->36 ->36 ->36 ->36 ->36 ->36 ->..
7 ->22 ->25 ->40 ->7 ->22 ->25 ->40 ->7 ->..
		

Crossrefs

Programs

  • Maple
    read("transforms") :
    A055566 := proc(n)
            digsum(n^5) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Table[Total[IntegerDigits[n^5]],{n,0,80}] (* Harvey P. Dale, Feb 12 2023 *)
  • PARI
    a(n) = sumdigits(n^5); \\ Seiichi Manyama, Nov 16 2021

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
    

A373914 a(n) is the largest digit sum of all n-digit fourth powers.

Original entry on oeis.org

1, 9, 13, 19, 25, 37, 43, 52, 55, 70, 76, 79, 85, 99, 103, 108, 118, 127, 135, 142, 144, 153, 171, 166, 178, 181, 189, 198, 205, 211, 220, 232, 234, 243, 252, 261, 265, 274, 279, 283, 297, 298, 313, 316, 325, 334, 337, 346, 358
Offset: 1

Views

Author

Zhining Yang, Jun 22 2024

Keywords

Examples

			a(3) = 13 because 13 is the largest digital sum encountered among all 3-digit fourth powers (attained at both fourth powers: 256, 625).
		

Crossrefs

Programs

  • C
    /* See links. */
  • Mathematica
    Table[Max@Map[Total@IntegerDigits[#^4] &, Range[Ceiling[10^((n - 1)/4)], Floor[(10^n-1)^(1/4)]]], {n, 32}]
  • PARI
    a(n) = my(m=ceil(10^((n-1)/4)), M=sqrtint(sqrtint(10^n))); vecmax(apply(sumdigits, vector(M-m+1, i, (i+m-1)^4))); \\ Michel Marcus, Jun 23 2024
    
  • Python
    from sympy import integer_nthroot
    def A373914(n): return max(sum(int(d) for d in str(m**4)) for m in range((lambda x:x[0]+(x[1]^1))(integer_nthroot(10**(n-1),4)),1+integer_nthroot(10**n-1,4)[0])) # Chai Wah Wu, Jun 26 2024
    

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

A055567 Sum of digits of n^6.

Original entry on oeis.org

0, 1, 10, 18, 19, 19, 27, 28, 19, 18, 1, 28, 45, 37, 37, 27, 37, 37, 18, 37, 10, 36, 37, 46, 36, 28, 46, 45, 37, 37, 18, 46, 37, 54, 37, 46, 45, 46, 37, 45, 19, 28, 45, 37, 46, 45, 64, 46, 36, 37, 19, 54, 55, 37, 54, 46, 55, 54, 55, 37, 27, 37, 46, 36, 64, 55, 45, 55, 64, 45
Offset: 0

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 10 because 2^6 = 64 and 6+4 = 10.
		

Crossrefs

Programs

  • Mathematica
    DigitSum[Range[0, 100]^6] (* Paolo Xausa, Jul 03 2024 *)
  • PARI
    a(n) = sumdigits(n^6); \\ Seiichi Manyama, Nov 16 2021

A286650 a(n) is the smallest number m such that the sum of the digits of m^4 is equal to n^4.

Original entry on oeis.org

0, 1, 11, 1434, 1269681358
Offset: 0

Views

Author

Seiichi Manyama, Aug 15 2017

Keywords

Examples

			a(2) = 11 as 11^4 = 14641 is the smallest fourth power whose digit sum = 16 = 2^4.
		

Crossrefs

Cf. A000583 (n^4), A055565 (sum of digits of n^4).

Programs

  • PARI
    {a(n) = my(k=0); while(sumdigits(k^4) != n^4, k++); k}

A336225 Table read by antidiagonals: T(n, k) = digitsum(n*k) with n >= 0 and k >= 0.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jul 12 2020

Keywords

Examples

			The table T(n, k) begins
0   0   0   0   0   0   0   0 ...
0   1   2   3   4   5   6   7 ...
0   2   4   6   8   1   3   5 ...
0   3   6   9   3   6   9   3 ...
0   4   8   3   7   2   6  10 ...
0   5   1   6   2   7   3   8 ...
0   6   3   9   6   3   9   6 ...
0   7   5   3  10   8   6  13 ...
...
		

Crossrefs

Cf. A003991, A004092, A004159 (diagonal), A004164 (digitsum of n^3), A004247, A007953, A055565 (digitsum of n^4), A055566 (digitsum of n^5), A055567 (digitsum of n^6).

Programs

  • Mathematica
    T[n_,k_]:=Total[IntegerDigits[n*k]]; Table[T[n-k,k],{n,0,12},{k,0,n}]//Flatten
  • PARI
    T(n, k) = sumdigits(n*k);

Formula

T(n, k) = A007953(A004247(n, k)).
T(n, 1) = T(1, n) = A007953(n).
T(n, 2) = T(2, n) = A004092(n).
T(n, k) = A007953(A003991(n, k)) for n*k > 0. - Michel Marcus, Jul 13 2020.

A118470 Numbers k for which digitsum(k) + digitsum(k^2) + digitsum(k^3) = digitsum(k^4).

Original entry on oeis.org

0, 162, 171, 351, 468, 558, 1620, 1710, 2106, 3321, 3510, 4023, 4680, 5121, 5247, 5544, 5580, 5868, 8001, 10008, 10071, 10224, 10305, 10503, 10818, 11025, 11241, 11511, 12321, 12654, 12888, 13239, 14004, 14301, 15471, 15876, 16011, 16200, 16218, 17100
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 04 2006

Keywords

Comments

If x is a term, then so is 10*x. - Michael S. Branicky, Dec 25 2021

Examples

			162 is a term because s(162) = 9, s(162^2) = 18, s(162^3) = 27, s(162^4) = 54 and 9 + 18 + 27 = 54.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 20000], Sum[i*(DigitCount[ # ][[i]] + DigitCount[ #^2][[i]] + DigitCount[ #^3][[i]]), {i, 1, 9}] == Sum[i*DigitCount[ #^4][[i]], {i, 1, 9}] &] (* Stefan Steinerberger, May 04 2006 *)
    s[n_] := Plus @@ IntegerDigits@n; Select[ Range[0, 16217], s@# + s[ #^2] + s[ #^3] == s[ #^4] &] (* Robert G. Wilson v, May 04 2006 *)
    Parallelize[While[True,If[Total[IntegerDigits[n]]+Total[IntegerDigits[n^2]]+Total[IntegerDigits[n^3]]==Total[IntegerDigits[n^4]],Print[n]];n++];n] (* J.W.L. (Jan) Eerland, Dec 25 2021 *)
  • PARI
    is(n)=my(s=sumdigits); s(n)+s(n^2)+s(n^3) == s(n^4) \\ Anders Hellström, Sep 16 2015
    
  • PARI
    select(isA118470(n)={sumdigits(n)+sumdigits(n^2)+sumdigits(n^3) == sumdigits(n^4)}, [0..1000]) \\ J.W.L. (Jan) Eerland, Dec 25 2021
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n) + sd(n**2) + sd(n**3) == sd(n**4)
    print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Dec 25 2021

Extensions

More terms from Joshua Zucker, May 11 2006

A099358 a(n) = sum of digits of k^4 as k runs from 1 to n.

Original entry on oeis.org

1, 8, 17, 30, 43, 61, 68, 87, 105, 106, 122, 140, 162, 184, 202, 227, 246, 273, 283, 290, 317, 339, 370, 397, 422, 459, 477, 505, 530, 539, 561, 592, 619, 644, 663, 699, 727, 752, 770, 783, 814, 841, 866, 903, 921, 958, 1001, 1028, 1059, 1072, 1099, 1124, 1161
Offset: 1

Views

Author

Yalcin Aktar, Nov 16 2004

Keywords

Comments

Partial sums of A055565.

Examples

			a(3) = sum_digits(1^4) + sum_digits(2^4) + sum_digits(3^4) = 1 + 7 + 9 = 17.
		

Crossrefs

Cf. k^1 in A037123, k^2 in A071317 & k^3 in A071121.

Programs

  • Mathematica
    f[n_] := Block[{s = 0, k = 1}, While[k <= n, s = s + Plus @@ IntegerDigits[k^4]; k++ ]; s]; Table[ f[n], {n, 50}] (* Robert G. Wilson v, Nov 18 2004 *)
    Accumulate[Table[Total[IntegerDigits[n^4]],{n,60}]] (* Harvey P. Dale, Jun 08 2021 *)

Formula

a(n) = a(n-1) + sum of decimal digits of n^4.
a(n) = sum(k=1, n, sum(m=0, floor(log(k^4)), floor(10((k^4)/(10^(((floor(log(k^4))+1))-m)) - floor((k^4)/(10^(((floor(log(k^4))+1))-m))))))).
General formula: a(n)_p = sum(k=1, n, sum(m=0, floor(log(k^p)), floor(10((k^p)/(10^(((floor(log(k^p))+1))-m)) - floor ((k^p)/(10^(((floor(log(k^p))+1))-m))))))). Here a(n)_p is a sum of digits of k^p from k=1 to n.

Extensions

Edited and extended by Robert G. Wilson v, Nov 18 2004
Existing example replaced with a simpler one by Jon E. Schoenfield, Oct 20 2013
Showing 1-9 of 9 results.