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-8 of 8 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

A308477 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{j=1..n, gcd(n,j) = 1} j^k.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 5, 4, 4, 1, 1, 9, 10, 10, 2, 1, 1, 17, 28, 30, 6, 6, 1, 1, 33, 82, 100, 26, 21, 4, 1, 1, 65, 244, 354, 126, 91, 16, 6, 1, 1, 129, 730, 1300, 626, 441, 84, 27, 4, 1, 1, 257, 2188, 4890, 3126, 2275, 496, 159, 20, 10, 1, 1, 513, 6562, 18700, 15626, 12201, 3108, 1053, 140, 55, 4
Offset: 1

Views

Author

Ilya Gutkovskiy, May 29 2019

Keywords

Examples

			Square array begins:
  1,   1,   1,    1,    1,     1,  ...
  1,   1,   1,    1,    1,     1,  ...
  2,   3,   5,    9,   17,    33,  ...
  2,   4,  10,   28,   82,   244,  ...
  4,  10,  30,  100,  354,  1300,  ...
  2,   6,  26,  126,  626,  3126,  ...
		

Crossrefs

Columns k=0..4 give A000010, A023896, A053818, A053819, A053820.
Cf. A103438.

Programs

  • Mathematica
    Table[Function[k, Sum[If[GCD[n, j] == 1, j^k, 0], {j, 1, n}]][i - n], {i, 0, 12}, {n, 1, i}] // Flatten

A295574 a(n) = Sum_{1 <= j <= n/2, gcd(j,n)=1} j^2.

Original entry on oeis.org

0, 1, 1, 1, 5, 1, 14, 10, 21, 10, 55, 26, 91, 35, 70, 84, 204, 75, 285, 140, 210, 165, 506, 196, 525, 286, 549, 406, 1015, 340, 1240, 680, 880, 680, 1190, 654, 2109, 969, 1482, 1080, 2870, 966, 3311, 1650, 2010, 1771, 4324, 1544, 4214, 2050
Offset: 1

Views

Author

N. J. A. Sloane, Dec 08 2017

Keywords

Comments

n does not divide a(n) iff n = (2^k)*(q^m) with k > 0, m >= 0 and q odd prime such that q == 3 (mod 4) or n = (2^k)*(3^L)*Product_{q} q^(v_q) with k >= 0, L > 0, v_q >= 0 and all q odd primes such that q == 5 (mod 6). - René Gy, Oct 21 2018

Crossrefs

In the Baum (1982) paper, S_1, S_2, S_3, S_4 are A023896, A053818, A053819, A053820, and S'_1, S'_2, S'_3, S'_4 are A066840, A295574, A295575, A295576.
Cf. A023022.

Programs

  • Maple
    R:=proc(n,k) local x,t1,S;
    t1:={}; S:=0;
    for x from 1 to floor(n/2) do if gcd(x,n)=1 then t1:={op(t1),x^k}; S:=S+x^k; fi; od;
    S; end;
    s:=k->[seq(R(n,k),n=1..50)];
    s(2);
  • Mathematica
    f[n_] := Plus @@ (Select[ Range[n/2], GCD[#, n] == 1 &]^2); Array[f, 50] (* Robert G. Wilson v, Dec 10 2017 *)
  • PARI
    a(n) = sum(j=1, n\2, (gcd(j, n)==1)*j^2); \\ Michel Marcus, Dec 10 2017

A295575 a(n) = Sum_{1 <= j <= n/2, gcd(j,n)=1} j^3.

Original entry on oeis.org

0, 1, 1, 1, 9, 1, 36, 28, 73, 28, 225, 126, 441, 153, 416, 496, 1296, 469, 2025, 1100, 1710, 1225, 4356, 1800, 4959, 2556, 5581, 4410, 11025, 3872, 14400, 8128, 11090, 8128, 15822, 8910, 29241, 13041, 21996, 16400, 44100, 15426, 53361, 27830, 33716, 29161, 76176, 27936, 77652, 37828
Offset: 1

Views

Author

N. J. A. Sloane, Dec 08 2017

Keywords

Comments

If p is an odd prime, a(p) = (n^2-1)^2/64. - Robert Israel, Dec 10 2017

Crossrefs

In the Baum (1982) paper, S_1, S_2, S_3, S_4 are A023896, A053818, A053819, A053820, and S'_1, S'_2, S'_3, S'_4 are A066840, A295574, A295575, A295576.

Programs

  • Maple
    f:= n -> add(t^3, t = select(t->igcd(t,n)=1, [$1..n/2])) :
    map(f, [$1..100]); # Robert Israel, Dec 10 2017
  • Mathematica
    f[n_] := Plus @@ (Select[Range[n/2], GCD[#, n] == 1 &]^3); Array[f, 50] (* Robert G. Wilson v, Dec 10 2017 *)
  • PARI
    a(n) = sum(j=1, n\2, (gcd(j, n)==1)*j^3); \\ Michel Marcus, Dec 10 2017

A295576 a(n) = Sum_{1 <= j <= n/2, gcd(j,n)=1} j^4.

Original entry on oeis.org

0, 1, 1, 1, 17, 1, 98, 82, 273, 82, 979, 626, 2275, 707, 2674, 3108, 8772, 3027, 15333, 9044, 14994, 9669, 39974, 17668, 50085, 24310, 60597, 50470, 127687, 45604, 178312, 103496, 149908, 103496, 225302, 129750, 432345, 187017, 349830, 266088, 722666
Offset: 1

Views

Author

N. J. A. Sloane, Dec 08 2017

Keywords

Comments

If p is an odd prime, a(p) = p*(p^2-1)*(3*p^2-7)/480. - Robert Israel, Dec 10 2017

Crossrefs

In the Baum (1982) paper, S_1, S_2, S_3, S_4 are A023896, A053818, A053819, A053820, and S'_1, S'_2, S'_3, S'_4 are A066840, A295574, A295575, A295576.

Programs

  • Maple
    f:= n -> add(t^4, t = select(t->igcd(t,n)=1, [$1..n/2])):
    map(f, [$1..100]); # Robert Israel, Dec 10 2017
  • Mathematica
    f[n_] := Plus @@ (Select[Range[n/2], GCD[#, n] == 1 &]^4); Array[f, 41] (* Robert G. Wilson v, Dec 10 2017 *)
  • PARI
    a(n) = sum(j=1, n\2, (gcd(j, n)==1)*j^4); \\ Michel Marcus, Dec 10 2017

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

Original entry on oeis.org

1, 2, 18, 84, 355, 645, 2276, 3192, 7413, 9400, 25334, 18395, 60711, 52747, 88760, 106688, 243849, 137790, 432346, 275570, 499867, 522513, 1151404, 561415, 1542125, 1214436, 1907502, 1569673, 3756719, 1344999, 5274000, 3451216, 4970577, 4690778, 7499154, 4217504, 12948595, 8207261, 11565572
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 17 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[(k/GCD[n, k])^4, {k, 1, n}], {n, 1, 39}]
  • PARI
    a(n) = sum(k=1, n, (k/gcd(n, k))^4); \\ Michel Marcus, Apr 17 2021

Formula

a(n) = Sum_{d|n} A053820(d).

A057792 Sum[k^k], where sum is over positive integers, k, where k <= n and gcd(k,n) = 1.

Original entry on oeis.org

1, 1, 5, 28, 288, 3126, 50069, 826696, 17604145, 388244060, 10405071317, 285312497280, 9211817190184, 303160805686506, 11415167261421900, 438197051187369424, 18896062057839751444, 827240565046755853710
Offset: 1

Views

Author

Leroy Quet, Nov 04 2000

Keywords

Examples

			a(4) = 1^1 + 3^3 = 28, since 1 and 3 are the positive integers <= 4 and relatively prime to 4.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, if (gcd(k, n)==1, k^k)); \\ Michel Marcus, Jun 19 2021
Showing 1-8 of 8 results.