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.
%I A283615 #21 Aug 02 2022 09:12:55 %S A283615 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 A283615 56,166,348,510,520,350,140,26,1,2,17,88,336,932,1948,2992,3404,2756, %U A283615 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 A283615 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 A283615 T(n,k) is the number of unique circular arrays (A283614) given equivalence under rotation. %F A283615 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 A283615 T(n,2*n) = A003239(n). %F A283615 T(n,2*n-1) = 2*binomial(2*(n-1), n-1). %F A283615 T(n,n) = A110710(n). %e A283615 Table for n=[0..6], k=[0..12] %e A283615 0 1 2 3 4 5 6 7 8 9 10 11 12 %e A283615 ----------------------------------------------------------------------------- %e A283615 0 | 1 %e A283615 1 | 1 2 1 %e A283615 2 | 1 2 5 4 2 %e A283615 3 | 1 2 7 16 18 12 4 %e A283615 4 | 1 2 11 32 70 92 82 40 10 %e A283615 5 | 1 2 13 56 166 348 510 520 350 140 26 %e A283615 6 | 1 2 17 88 336 932 1948 2992 3404 2756 1518 504 80 %e A283615 The 13 necklaces for n=5, k=2 are: %e A283615 [+-+-+-+-0+0-],[+-+-+-+0+-0-],[+-+-+-+0-+0-],[+-+-+-0+-+0-] %e A283615 [+-+-+0+-+-0-],[+-+-+0-+-+0-],[+-+-+-+-+0-0],[+-+-+-+-0+-0] %e A283615 [+-+-+-+-0-+0],[+-+-+-+0-+-0],[+-+-+-0+-+-0],[+-+-+-0-+-+0] %e A283615 [+-+-+0-+-+-0]. %o A283615 (Maxima) %o A283615 g(x,y):=2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1; %o A283615 A283614(n,k):=coeff(limit(diff(g(x,y),y,n)/n!,y,0),x,k); %o A283615 A283615(n,k):=block([s,d], %o A283615 s:0, %o A283615 for d in divisors(gcd(n,k)) do %o A283615 s:s+totient(d)*A283614(n/d,k/d), %o A283615 return(s/(2*n+k))); %Y A283615 Cf. A000010, A003239, A110710, A283614. %K A283615 nonn,tabf %O A283615 0,3 %A A283615 _Stefan Hollos_, Apr 11 2017