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.

A053820 a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^4.

Original entry on oeis.org

1, 1, 17, 82, 354, 626, 2275, 3108, 7395, 9044, 25333, 17668, 60710, 50470, 88388, 103496, 243848, 129750, 432345, 266088, 497574, 497178, 1151403, 539912, 1541770, 1153724, 1900089, 1516844, 3756718, 1246568, 5273999
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Comments

If gcd(n,30) = 1, then a(n) is divisible by n. If n has at least one prime factor == 1 (mod 30), then a(n) is divisible by n. - Jianing Song, Jul 13 2018

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 15, the function phi_4(n).
  • L. E. Dickson, History of the Theory of Numbers, Vol. I (Reprint 1966), p. 140.

Crossrefs

Column k=4 of A308477.

Programs

  • Mathematica
    a[n_] := Sum[If[GCD[n, k] == 1, k^4, 0], {k, 1, n}]; Table[a[n], {n, 1, 31}] (* Jean-François Alcover, Feb 26 2014 *)
    a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^4/5) * Times @@ ((p - 1)*p^(e - 1)) + (n^3/3) * Times @@ (1 - p) - (n/30) * Times @@ (1 - p^3)]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
  • PARI
    a(n) = sum(k=1, n, (gcd(n,k) == 1)*k^4); \\ Michel Marcus, Feb 26 2014
    
  • PARI
    a(n) = {my(f = factor(n)); if(n == 1, 1, (n^4/5) * eulerphi(f) + (n^3/3) * prod(i = 1, #f~, 1 - f[i, 1]) - (n/30) * prod(i = 1, #f~, 1 - f[i, 1]^3));} \\ Amiram Eldar, Dec 03 2023

Formula

a(n) = (6*n^4*A000010(n)+10*n^3*A023900(n)-n*A063453(n))/30 for n>1. Formula is derived from a more general formula of A. Thacker (1850), see [Dickson, Brown]. - Franz Vrabec, Aug 21 2005
G.f. A(x) satisfies: A(x) = x*(1 + 11*x + 11*x^2 + x^3)/(1 - x)^6 - Sum_{k>=2} k^4 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ n^6 / (5*Pi^2). - Amiram Eldar, Dec 03 2023