Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #25 Jan 23 2022 08:41:08
%S 1,2,6,3,12,33,4,24,96,280,5,40,255,1040,3145,6,84,780,4200,15810,
%T 46956,7,140,2205,16408,78155,279972,823585,8,288,6672,65840,391320,
%U 1681008,5767328,16781472,9,540,19755,262296,1953405,10078164,40354335,134218800,387422001
%N Triangle T(n,k) = Sum_{d|n} phi(d)*k^(n/d).
%C Dirichlet convolution of A000010(n) and k^n. - _Richard L. Ollerton_, May 10 2021
%H Alois P. Heinz, <a href="/A054618/b054618.txt">Rows n = 1..141, flattened</a>
%F From _Richard L. Ollerton_, May 10 2021: (Start)
%F T(n,k) = Sum_{i=1..n} k^gcd(n,i).
%F T(n,k) = Sum_{i=1..n} k^(n/gcd(n,i))*phi(gcd(n,i))/phi(n/gcd(n,i)). (End)
%e 1;
%e 2, 6;
%e 3, 12, 33;
%e 4, 24, 96, 280;
%e 5, 40, 255, 1040, 3145;
%e 6, 84, 780, 4200, 15810, 46956;
%e ...
%p with(numtheory):
%p T:= (n, k)-> add(phi(d)*k^(n/d), d=divisors(n)):
%p seq(seq(T(n, k), k=1..n), n=1..10); # _Alois P. Heinz_, Aug 28 2013
%p A054618 := proc(n, k)
%p add( numtheory[phi](d)*k^(n/d),d=numtheory[divisors](n)) ;
%p end proc:
%p seq(seq(A054618(n,k),k=1..n),n=1..10) ; # _R. J. Mathar_, Jan 23 2022
%t T[n_, k_] := Sum[EulerPhi[d]*k^(n/d), {d, Divisors[n]}]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Feb 25 2015 *)
%o (PARI) T(n, k) = sumdiv(n, d, eulerphi(d)*k^(n/d)); \\ _Michel Marcus_, Feb 25 2015
%Y Cf. A054619, A054630, A054631.
%Y Main diagonal gives: A228640.
%Y Cf. A000010.
%K nonn,tabl
%O 1,2
%A _N. J. A. Sloane_, Apr 16 2000