Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Aug 02 2022 09:12:55
%S 1,1,2,1,1,2,5,4,2,1,2,7,16,18,12,4,1,2,11,32,70,92,82,40,10,1,2,13,
%T 56,166,348,510,520,350,140,26,1,2,17,88,336,932,1948,2992,3404,2756,
%U 1518,504,80,1,2,19,124,584,2056,5524,11444,18298,22428,20706,13944,6468,1848,246,1,2,23,168,944,3976,13120,34064,70380,115516
%N Irregular triangle read by rows: T(n,k) is the number of necklaces of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.
%C T(n,k) is the number of unique circular arrays (A283614) given equivalence under rotation.
%F T(n,k) = Sum_{d|gcd(n,k)} phi(d) * A283614(n/d,k/d) / (2*n+k) where phi is Euler's totient function (A000010).
%F T(n,2*n) = A003239(n).
%F T(n,2*n-1) = 2*binomial(2*(n-1), n-1).
%F T(n,n) = A110710(n).
%e Table for n=[0..6], k=[0..12]
%e 0 1 2 3 4 5 6 7 8 9 10 11 12
%e -----------------------------------------------------------------------------
%e 0 | 1
%e 1 | 1 2 1
%e 2 | 1 2 5 4 2
%e 3 | 1 2 7 16 18 12 4
%e 4 | 1 2 11 32 70 92 82 40 10
%e 5 | 1 2 13 56 166 348 510 520 350 140 26
%e 6 | 1 2 17 88 336 932 1948 2992 3404 2756 1518 504 80
%e The 13 necklaces for n=5, k=2 are:
%e [+-+-+-+-0+0-],[+-+-+-+0+-0-],[+-+-+-+0-+0-],[+-+-+-0+-+0-]
%e [+-+-+0+-+-0-],[+-+-+0-+-+0-],[+-+-+-+-+0-0],[+-+-+-+-0+-0]
%e [+-+-+-+-0-+0],[+-+-+-+0-+-0],[+-+-+-0+-+-0],[+-+-+-0-+-+0]
%e [+-+-+0-+-+-0].
%o (Maxima)
%o g(x,y):=2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1;
%o A283614(n,k):=coeff(limit(diff(g(x,y),y,n)/n!,y,0),x,k);
%o A283615(n,k):=block([s,d],
%o s:0,
%o for d in divisors(gcd(n,k)) do
%o s:s+totient(d)*A283614(n/d,k/d),
%o return(s/(2*n+k)));
%Y Cf. A000010, A003239, A110710, A283614.
%K nonn,tabf
%O 0,3
%A _Stefan Hollos_, Apr 11 2017