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

A053818 a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^2.

Original entry on oeis.org

1, 1, 5, 10, 30, 26, 91, 84, 159, 140, 385, 196, 650, 406, 620, 680, 1496, 654, 2109, 1080, 1806, 1650, 3795, 1544, 4150, 2756, 4365, 3164, 7714, 2360, 9455, 5456, 7370, 6256, 9940, 5196, 16206, 8778, 12324, 8560, 22140, 6972, 25585
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Comments

Equals row sums of triangle A143612. - Gary W. Adamson, Aug 27 2008
a(n) = A175505(n) * A023896(n) / A175506(n). For number n >= 1 holds B(n) = a(n) / A023896(n) = A175505(n) / A175506(n), where B(n) = antiharmonic mean of numbers k such that GCD(k, n) = 1 for k < n. - Jaroslav Krizek, Aug 01 2010
n does not divide a(n) iff n is a term in A316860, that is, either n is a power of 2 or n is a multiple of 3 and no prime factor of n is congruent to 1 mod 3. - Jianing Song, Jul 16 2018

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 15, the function phi_2(n).
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #2.

Crossrefs

Programs

  • Maple
    A053818 := proc(n)
        local a,k;
        a := 0 ;
        for k from 1 to n do
            if igcd(k,n) = 1 then
                a := a+k^2 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 26 2013
  • Mathematica
    a[n_] := Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2); Array[a, 43] (* Robert G. Wilson v, Jul 01 2010 *)
    a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^2/3) * Times @@ ((p - 1)*p^(e - 1)) + (n/6) * Times @@ (1 - p)]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
  • PARI
    a(n) = sum(k=1, n, k^2*(gcd(n,k) == 1)); \\ Michel Marcus, Jan 30 2016
    
  • PARI
    a(n) = {my(f = factor(n)); if(n == 1, 1, (n^2/3) * eulerphi(f) + (n/6) * prod(i = 1, #f~, 1 - f[i, 1]));} \\ Amiram Eldar, Dec 03 2023

Formula

If n = p_1^e_1 * ... *p_r^e_r then a(n) = n^2*phi(n)/3 + (-1)^r*p_1*..._p_r*phi(n)/6.
a(n) = n^2*A000010(n)/3 + n*A023900(n)/6, n>1. [Brown]
a(n) = (A000010(n)/3) * (n^2 + (-1)^A001221(n)*A007947(n)/2) for n>=2. - Jaroslav Krizek, Aug 24 2010
G.f. A(x) satisfies: A(x) = x*(1 + x)/(1 - x)^4 - Sum_{k>=2} k^2 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ n^4 / (2*Pi^2). - Amiram Eldar, Dec 03 2023

A053819 a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^3.

Original entry on oeis.org

1, 1, 9, 28, 100, 126, 441, 496, 1053, 1100, 3025, 1800, 6084, 4410, 7200, 8128, 18496, 8910, 29241, 16400, 29106, 27830, 64009, 27936, 77500, 54756, 88209, 67032, 164836, 52200, 216225, 130816, 185130, 161840, 264600, 140616, 443556
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Comments

Except for a(2) = 1, a(n) is always 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_3(n).

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= ifactors(n)[2];
      numtheory:-phi(n)*(n^3 + (-1)^nops(F)*mul(t[1],t=F)*n)/4
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Jan 29 2018
  • Mathematica
    Table[Sum[j^3, {j, Select[Range[n], GCD[n, #] == 1 &]}], {n, 1, 37}] (* Geoffrey Critzer, Mar 03 2015 *)
    a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^2/4) * (n * Times @@ ((p - 1)*p^(e - 1)) + Times @@ (1 - p))]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
  • PARI
    a(n) = sum(k=1,n, k^3*(gcd(n,k)==1)); \\ Michel Marcus, Mar 03 2015
    
  • PARI
    a(n) = {my(f = factor(n)); if(n == 1, 1, (n^2/4) * (n * eulerphi(f) + prod(i = 1, #f~, 1 - f[i, 1])));} \\ Amiram Eldar, Dec 03 2023

Formula

a(n) = n^2/4*(n*A000010(n) + A023900(n)), n > 1. - Vladeta Jovovic, Apr 17 2002
a(n) = eulerphi(n)*(n^3 + (-1)^omega(n)*rad(n)*n)/4. See Petridi link. - Michel Marcus, Jan 29 2017
G.f. A(x) satisfies: A(x) = x*(1 + 4*x + x^2)/(1 - x)^5 - Sum_{k>=2} k^3 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ 3 * n^5 / (10*Pi^2). - Amiram Eldar, Dec 03 2023

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

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

Original entry on oeis.org

1, 1, 9, 82, 1300, 15626, 376761, 6161988, 176787117, 3769318700, 142364319625, 3152513804548, 154718778284148, 4340009120036086, 210971169748692000, 7281661100510001416, 435659030617933827136, 14181101408561469791694, 1052864393300587929716721, 41673894815421072916530408
Offset: 1

Views

Author

Ilya Gutkovskiy, May 30 2019

Keywords

Crossrefs

First superdiagonal of A308477.
Cf. A031971.

Programs

  • Mathematica
    a[n_] := Sum[If[GCD[n, k] == 1, k^n, 0], {k, 1, n}]; Table[a[n], {n, 1, 20}]
  • PARI
    a(n) = sum(k=1, n, (gcd(n,k)==1)*k^n) \\ Felix Fröhlich, May 30 2019
Showing 1-4 of 4 results.