A018804
Pillai's arithmetical function: Sum_{k=1..n} gcd(k, n).
Original entry on oeis.org
1, 3, 5, 8, 9, 15, 13, 20, 21, 27, 21, 40, 25, 39, 45, 48, 33, 63, 37, 72, 65, 63, 45, 100, 65, 75, 81, 104, 57, 135, 61, 112, 105, 99, 117, 168, 73, 111, 125, 180, 81, 195, 85, 168, 189, 135, 93, 240, 133, 195, 165, 200, 105, 243, 189, 260, 185, 171, 117, 360
Offset: 1
G.f. = x + 3*x^2 + 5*x^3 + 8*x^4 + 9*x^5 + 15*x^6 + 13*x^7 + 20*x^8 + ...
- S. S. Pillai, On an arithmetic function, J. Annamalai University 2 (1933), pp. 243-248.
- J. Sándor, A generalized Pillai function, Octogon Mathematical Magazine Vol. 9, No. 2 (2001), 746-748.
- Seiichi Manyama, Table of n, a(n) for n = 1..10000 (first 2000 terms from T. D. Noe)
- U. Abel, W. Awan, and V. Kushnirevych, A Generalization of the Gcd-Sum Function, J. Int. Seq. 16 (2013) #13.6.7.
- Antal Bege, Hadamard product of GCD matrices, Acta Univ. Sapientiae, Mathematica, 1, 1 (2009) 43-49.
- Olivier Bordelles, The Composition of the gcd and Certain Arithmetic Functions, J. Int. Seq. 13 (2010) #10.7.1.
- Olivier Bordelles, An Asymptotic Formula for Short Sums of Gcd-Sum Functions, Journal of Integer Sequences, Vol. 15 (2012), #12.6.8.
- Olivier Bordelles, A Multidimensional Cesáro Type Identity and Applications, J. Int. Seq. 18 (2015) # 15.3.7.
- Kevin A. Broughan, The gcd-sum function, Journal of Integer Sequences 4 (2001), Article 01.2.2, 19 pp.
- J.-M. De Koninck and I. Kátai, Some remarks on a paper of L. Toth, JIS 13 (2010) 10.1.2.
- Pentti Haukkanen and László Tóth, Menon-type identities again: Note on a paper by Li, Kim and Qiao, arXiv:1911.05411 [math.NT], 2019.
- Soichi Ikeda and Kaneaki Matsuoka, On the Lcm-Sum Function, Journal of Integer Sequences, Vol. 17 (2014), Article 14.1.7.
- Mathematical Reflections, Solution to Problem O364, Issue 2, 2016, p 24. [Cached copy at Wayback Machine]
- Taylor McAdam, Almost-primes in horospherical flows on the space of lattices, arXiv:1802.08764 [math.DS], 2018.
- Taylor McAdam, Almost-prime times in horospherical flows on the space of lattices, Journal of Modern Dynamics (2019) Vol. 15, 277-327.
- J. Ransford, A Sum of Gcd’s over Friable Numbers, JIS vol 19 (2016) # 16.3.2
- Jeffrey Shallit, Problem E 2821, American Mathematical Monthly 87 (1980), 220.
- Jeffrey Shallit, Solution, American Mathematical Monthly, 88 (1981), 444-445.
- László Tóth, A gcd-sum function over regular integers modulo n, JIS 12 (2009) 09.2.5.
- László Tóth, On the Bi-Unitary Analogues of Euler's Arithmetical Function and the Gcd-Sum Function, JIS 12 (2009) 09.5.2.
- László Tóth, A survey of gcd-sum functions, J. Integer Sequences 13 (2010), Article 10.8.1, 23 pp.
- László Tóth, Weighted gcd-sum functions, J. Integer Sequences, 14 (2011), Article 11.7.7.
- D. Zhang and W. Zhai, Mean Values of a Gcd-Sum Function Over Regular Integers Modulo n, J. Int. Seq. 13 (2010), 10.4.7.
- D. Zhang and W. Zhai, Mean Values of a Class of Arithmetical Functions, J. Int. Seq. 14 (2011) #11.6.5.
- D. Zhang and W. Zhai, On an Open Problem of Tóth, J. Int. Seq. 16 (2013) #13.6.5.
Cf.
A080997,
A080998 for rankings of the positive integers in terms of centrality, defined to be the average fraction of an integer that it shares with the other integers as a gcd, or
A018804(n)/n^2, also
A080999, a permutation of this sequence (
A080999(n) =
A018804(
A080997(n))).
Cf.
A185210,
A010766,
A054523,
A127468,
A050873,
A078430,
A095026,
A227507,
A000010,
A344372,
A272718 (partial sums),
A368736 -
A368741.
-
a018804 n = sum $ map (gcd n) [1..n] -- Reinhard Zumkeller, Jul 16 2012
-
[&+[Gcd(n,k):k in [1..n]]:n in [1..60]]; // Marius A. Burtea, Nov 14 2019
-
a:=n->sum(igcd(n,j),j=1..n): seq(a(n), n=1..60); # Zerinvary Lajos, Nov 05 2006
-
f[n_] := Block[{d = Divisors[n]}, Sum[ d*EulerPhi[n/d], {d, d}]]; Table[f[n], {n, 60}] (* Robert G. Wilson v, Mar 20 2012 *)
a[ n_] := If[ n < 1, 0, n Sum[ EulerPhi[d] / d, {d, Divisors@n}]]; (* Michael Somos, Jan 07 2017 *)
f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jul 19 2019 *)
-
{a(n) = direuler(p=2, n, (1 - X) / (1 - p*X)^2)[n]}; /* Michael Somos, May 31 2000 */
-
a(n)={ my(ct=0); for(i=0,n-1,for(j=0,n-1, ct+=(Mod(i*j,n)==0) ) ); ct; } \\ Joerg Arndt, Aug 03 2013
-
a(n)=my(f=factor(n)); prod(i=1,#f~,(f[i,2]*(f[i,1]-1)/f[i,1] + 1)*f[i,1]^f[i,2]) \\ Charles R Greathouse IV, Oct 28 2014
-
a(n) = sumdiv(n, d, n*eulerphi(d)/d); \\ Michel Marcus, Jan 07 2017
-
from sympy.ntheory import totient, divisors
print([sum(n*totient(d)//d for d in divisors(n)) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017
-
from sympy import factorint
from math import prod
def A018804(n): return prod(p**(e-1)*((p-1)*e+p) for p, e in factorint(n).items()) # Chai Wah Wu, Nov 29 2021
A069097
Moebius transform of A064987, n*sigma(n).
Original entry on oeis.org
1, 5, 11, 22, 29, 55, 55, 92, 105, 145, 131, 242, 181, 275, 319, 376, 305, 525, 379, 638, 605, 655, 551, 1012, 745, 905, 963, 1210, 869, 1595, 991, 1520, 1441, 1525, 1595, 2310, 1405, 1895, 1991, 2668, 1721, 3025, 1891, 2882, 3045, 2755, 2255, 4136, 2737
Offset: 1
-
A069097[n_]:=n^2*Plus @@((EulerPhi[#]/#^2)&/@ Divisors[n]); Array[A069097, 100] (* Enrique Pérez Herrero, Feb 25 2012 *)
f[p_, e_] := p^(e-1)*(p^e*(p+1)-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
-
for(n=1,100,print1((sumdiv(n,k,k*sigma(k)*moebius(n/k))),","))
A343497
a(n) = Sum_{k=1..n} gcd(k, n)^3.
Original entry on oeis.org
1, 9, 29, 74, 129, 261, 349, 596, 789, 1161, 1341, 2146, 2209, 3141, 3741, 4776, 4929, 7101, 6877, 9546, 10121, 12069, 12189, 17284, 16145, 19881, 21321, 25826, 24417, 33669, 29821, 38224, 38889, 44361, 45021, 58386, 50689, 61893, 64061, 76884, 68961, 91089, 79549, 99234, 101781
Offset: 1
Cf.
A000010,
A001157 (sigma_2(n)),
A018804,
A054610,
A069097,
A309323,
A332517,
A342423,
A342433,
A343498,
A343499,
A343513.
-
A343497:= func< n | (&+[d^3*EulerPhi(Floor(n/d)): d in Divisors(n)]) >;
[A343497(n): n in [1..50]]; // G. C. Greubel, Jun 24 2024
-
with(numtheory):
seq(add(phi(n/d) * d^3, d in divisors(n)), n = 1..50); # Peter Bala, Jan 20 2024
-
a[n_] := Sum[GCD[k, n]^3, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Apr 18 2021 *)
f[p_, e_] := p^(e - 1)*((p^2 + p + 1)*p^(2*e) - 1)/(p + 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Nov 22 2022 *)
A343497[n_]:= DivisorSum[n, #^3*EulerPhi[n/#] &]; Table[A343497[n], {n, 50}] (* G. C. Greubel, Jun 24 2024 *)
-
a(n) = sum(k=1, n, gcd(k, n)^3);
-
a(n) = sumdiv(n, d, eulerphi(n/d)*d^3);
-
a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, 2));
-
my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k*(1+4*x^k+x^(2*k))/(1-x^k)^4))
-
def A343497(n): return sum(k^3*euler_phi(n/k) for k in (1..n) if (k).divides(n))
[A343497(n) for n in range(1,51)] # G. C. Greubel, Jun 24 2024
A343498
a(n) = Sum_{k=1..n} gcd(k, n)^4.
Original entry on oeis.org
1, 17, 83, 274, 629, 1411, 2407, 4388, 6729, 10693, 14651, 22742, 28573, 40919, 52207, 70216, 83537, 114393, 130339, 172346, 199781, 249067, 279863, 364204, 393145, 485741, 545067, 659518, 707309, 887519, 923551, 1123472, 1216033, 1420129, 1514003, 1843746, 1874197
Offset: 1
Cf.
A000010,
A001158 (sigma_3(n)),
A018804,
A054611,
A069097,
A332517,
A342423,
A342433,
A343497,
A343499,
A343514.
-
A343498:= func< n | (&+[d^4*EulerPhi(Floor(n/d)): d in Divisors(n)]) >;
[A343498(n): n in [1..50]]; // G. C. Greubel, Jun 24 2024
-
a[n_] := Sum[GCD[k, n]^4, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Apr 18 2021 *)
f[p_, e_] := p^(e-1)*(p^(3*e+4) - p^(3*e) - p + 1)/(p^3-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Nov 22 2022 *)
-
a(n) = sum(k=1, n, gcd(k, n)^4);
-
a(n) = sumdiv(n, d, eulerphi(n/d)*d^4);
-
a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, 3));
-
my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k*(1+11*x^k+11*x^(2*k)+x^(3*k))/(1-x^k)^5))
-
def A343498(n): return sum(k^4*euler_phi(n/k) for k in (1..n) if (k).divides(n))
[A343498(n) for n in range(1,51)] # G. C. Greubel, Jun 24 2024
A343516
Square array T(n,k), n >= 1, k >= 1, read by antidiagonals, where T(n,k) = Sum_{1 <= x_1 <= x_2 <= ... <= x_k <= n} gcd(x_1, x_2, ... , x_k, n).
Original entry on oeis.org
1, 1, 3, 1, 4, 5, 1, 5, 8, 8, 1, 6, 12, 15, 9, 1, 7, 17, 26, 19, 15, 1, 8, 23, 42, 39, 35, 13, 1, 9, 30, 64, 74, 76, 34, 20, 1, 10, 38, 93, 130, 153, 90, 56, 21, 1, 11, 47, 130, 214, 287, 216, 152, 63, 27, 1, 12, 57, 176, 334, 506, 468, 379, 191, 86, 21
Offset: 1
T(4,2) = gcd(1,1,4) + gcd(1,2,4) + gcd(2,2,4) + gcd(1,3,4) + gcd(2,3,4) + gcd(3,3,4) + gcd(1,4,4) + gcd(2,4,4) + gcd(3,4,4) + gcd(4,4,4) = 1 + 1 + 2 + 1 + 1 + 1 + 1 + 2 + 1 + 4 = 15.
Square array begins:
1, 1, 1, 1, 1, 1, 1, ...
3, 4, 5, 6, 7, 8, 9, ...
5, 8, 12, 17, 23, 30, 38, ...
8, 15, 26, 42, 64, 93, 130, ...
9, 19, 39, 74, 130, 214, 334, ...
15, 35, 76, 153, 287, 506, 846, ...
13, 34, 90, 216, 468, 930, 1722, ...
-
T[n_, k_] := DivisorSum[n, EulerPhi[n/#] * Binomial[k + # - 1, k] &]; Table[T[k, n - k + 1], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, Apr 18 2021 *)
-
T(n, k) = sumdiv(n, d, eulerphi(n/d)*binomial(d+k-1, k));
A342433
a(n) = Sum_{k=1..n} gcd(k,n)^(n-1).
Original entry on oeis.org
1, 3, 11, 74, 629, 8085, 117655, 2113796, 43059849, 1001955177, 25937424611, 743379914746, 23298085122493, 793811662313709, 29192938251553759, 1152956691126550536, 48661191875666868497, 2185928270773974154773
Offset: 1
-
a[n_] := Sum[GCD[k, n]^(n - 1), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 12 2021 *)
-
a(n) = sum(k=1, n, gcd(k, n)^(n-1));
-
a(n) = sumdiv(n, d, eulerphi(n/d)*d^(n-1));
-
a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, n-2));
A343499
a(n) = Sum_{k=1..n} gcd(k, n)^5.
Original entry on oeis.org
1, 33, 245, 1058, 3129, 8085, 16813, 33860, 59541, 103257, 161061, 259210, 371305, 554829, 766605, 1083528, 1419873, 1964853, 2476117, 3310482, 4119185, 5315013, 6436365, 8295700, 9778145, 12253065, 14468481, 17788154, 20511177, 25297965, 28629181, 34672912, 39459945, 46855809
Offset: 1
Cf.
A000010,
A001159 (sigma_4(n)),
A018804,
A054612,
A059378,
A069097,
A332517,
A342423,
A342433,
A343497,
A343498,
A344524.
-
A343499:= func< n | (&+[d^5*EulerPhi(Floor(n/d)): d in Divisors(n)]) >;
[A343499(n): n in [1..50]]; // G. C. Greubel, Jun 24 2024
-
a[n_] := Sum[GCD[k, n]^5, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Apr 18 2021 *)
f[p_, e_] := p^(e-1)*(p^(4*e+5) - p^(4*e) - p + 1)/(p^4-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Nov 22 2022 *)
-
a(n) = sum(k=1, n, gcd(k, n)^5);
-
a(n) = sumdiv(n, d, eulerphi(n/d)*d^5);
-
a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, 4));
-
my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k*(1+26*x^k+66*x^(2*k)+26*x^(3*k)+x^(4*k))/(1-x^k)^6))
-
def A343499(n): return sum(k^5*euler_phi(n/k) for k in (1..n) if (k).divides(n))
[A343499(n) for n in range(1,51)] # G. C. Greubel, Jun 24 2024
A344479
Square array T(n,k), n >= 1, k >= 1, read by antidiagonals, where T(n,k) = Sum_{1 <= x_1, x_2, ..., x_k <= n} gcd(x_1, x_2, ..., x_k).
Original entry on oeis.org
1, 1, 3, 1, 5, 6, 1, 9, 12, 10, 1, 17, 30, 24, 15, 1, 33, 84, 76, 37, 21, 1, 65, 246, 276, 141, 61, 28, 1, 129, 732, 1060, 649, 267, 80, 36, 1, 257, 2190, 4164, 3165, 1417, 400, 112, 45, 1, 513, 6564, 16516, 15697, 8091, 2528, 624, 145, 55, 1, 1025, 19686, 65796, 78261, 47521, 17128, 4432, 885, 189, 66
Offset: 1
G.f. of column 3: (1/(1 - x)) * Sum_{i>=1} phi(i) * (x^i + 4*x^(2*i) + x^(3*i))/(1 - x^i)^3.
Square array begins:
1, 1, 1, 1, 1, 1, ...
3, 5, 9, 17, 33, 65, ...
6, 12, 30, 84, 246, 732, ...
10, 24, 76, 276, 1060, 4164, ...
15, 37, 141, 649, 3165, 15697, ...
21, 61, 267, 1417, 8091, 47521, ...
-
T[n_, k_] := Sum[EulerPhi[j] * Quotient[n, j]^k, {j, 1, n}]; Table[T[k, n - k + 1], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, May 22 2021 *)
-
T(n, k) = sum(j=1, n, eulerphi(j)*(n\j)^k);
A344527
Square array T(n,k), n >= 1, k >= 1, read by antidiagonals, where T(n,k) is the number of ordered k-tuples (x_1, x_2, ..., x_k) with gcd(x_1, x_2, ..., x_k) = 1 (1 <= {x_1, x_2, ..., x_k} <= n).
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 25, 11, 1, 1, 31, 79, 55, 19, 1, 1, 63, 241, 239, 115, 23, 1, 1, 127, 727, 991, 607, 181, 35, 1, 1, 255, 2185, 4031, 3091, 1199, 307, 43, 1, 1, 511, 6559, 16255, 15559, 7501, 2303, 439, 55, 1, 1, 1023, 19681, 65279, 77995, 45863, 16531, 3823, 637, 63, 1
Offset: 1
G.f. of column 3: (1/(1 - x)) * Sum_{i>=1} mu(i) * (x^i + 4*x^(2*i) + x^(3*i))/(1 - x^i)^3.
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 3, 7, 15, 31, 63, ...
1, 7, 25, 79, 241, 727, ...
1, 11, 55, 239, 991, 4031, ...
1, 19, 115, 607, 3091, 15559, ...
1, 23, 181, 1199, 7501, 45863, ...
-
T[n_, k_] := Sum[MoebiusMu[j] * Quotient[n, j]^k, {j, 1, n}]; Table[T[k, n - k + 1], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, May 22 2021 *)
-
T(n, k) = sum(j=1, n, moebius(j)*(n\j)^k);
-
T(n, k) = n^k-sum(j=2, n, T(n\j, k));
-
from functools import lru_cache
from itertools import count, islice
@lru_cache(maxsize=None)
def A344527_T(n,k):
if n == 0:
return 0
c, j, k1 = 1, 2, n//2
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*A344527_T(k1,k)
j, k1 = j2, n//j2
return n*(n**(k-1)-1)-c+j
def A344527_gen(): # generator of terms
return (A344527_T(k+1, n-k) for n in count(1) for k in range(n))
A344527_list = list(islice(A344527_gen(),30)) # Chai Wah Wu, Nov 02 2023
A342432
a(n) = Sum_{k=1..n} gcd(k,n)^(n-2).
Original entry on oeis.org
1, 2, 5, 22, 129, 1411, 16813, 266372, 4787349, 100391653, 2357947701, 61980047702, 1792160394049, 56707753687079, 1946197516142925, 72061992621375496, 2862423051509815809, 121441389759089405193, 5480386857784802185957
Offset: 1
-
a[n_] := Sum[GCD[k, n]^(n - 2), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 12 2021 *)
-
a(n) = sum(k=1, n, gcd(k, n)^(n-2));
-
a(n) = sumdiv(n, d, eulerphi(n/d)*d^(n-2));
-
a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, n-3));
Showing 1-10 of 13 results.
Comments