%I #15 Sep 09 2018 11:47:09
%S 0,1,1,2,1,1,2,2,2,2,4,3,3,3,3,2,2,2,2,2,2,6,5,5,5,5,5,5,4,4,4,4,4,4,
%T 4,4,6,5,5,6,5,5,6,5,5,4,4,4,4,4,4,4,4,4,4,10,9,9,9,9,9,9,9,9,9,9,4,4,
%U 4,4,4,4,4,4,4,4,4,4,12,11,11,11,11,11,11,11,11,11,11,11,11
%N Triangle T(n,k) = Degree of vertex k in the unitary addition Cayley graph Gn, 0<=k<=n-1, with T(1,0)=0.
%C For n>1, the unitary addition Cayley graph Gn is the graph whose vertices are Z/nZ and where 2 vertices x and y are adjacent if x+y is a unit in Z/nZ.
%H M. Deaconescu, <a href="http://dx.doi.org/10.5169/seals-5635">Adding units mod n</a>, Elem. Math. 55 (2000) 123-127.
%H J. W. Sander, <a href="http://dx.doi.org/10.1016/j.jnt.2009.04.010">On the addition of units and nonunits mod m</a>, Journal of Number Theory, Volume 129, Issue 10, October 2009, Pages 2260-2266.
%H Deepa Sinha, Pravin Garg and Anjali Singh, <a href="http://nntdm.net/volume-17-2011/number-3/49-59/">Some properties of unitary addition Cayley graphs</a>, Notes on Number Theory and Discrete Mathematics, Volume 17, 2011, Number 3, Pages 49—59. See Figure 1 p. 3.
%F T(n,k) = phi(n) if n is even or if n id odd and gcd(n,k) != 1, phi(n-1) if n is odd and gcd(n,k) = 1, where phi is the Euler totient function.
%e Array starts:
%e 0;
%e 1, 1;
%e 2, 1, 1;
%e 2, 2, 2, 2;
%e 4, 3, 3, 3, 3;
%e 2, 2, 2, 2, 2, 2;
%e 6, 5, 5, 5, 5, 5, 5;
%e ...
%t Table[Which[EvenQ@ n, EulerPhi@ n, OddQ@ n && ! CoprimeQ[n, k], EulerPhi@ n, OddQ@ n && CoprimeQ[n, k], EulerPhi[n] - 1], {n, 13}, {k, 0, n - 1}] // Flatten (* _Michael De Vlieger_, Feb 02 2016 *)
%o (PARI) T(n, k) = if (n % 2, if (gcd(n,k)==1, eulerphi(n)-1, eulerphi(n)), eulerphi(n));
%K nonn,tabl
%O 1,4
%A _Michel Marcus_, Feb 02 2016
|