Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #25 Dec 10 2016 17:00:02
%S 1,2,2,1,-2,1,1,2,2,1,0,-2,-3,-2,0,1,2,1,1,2,1,0,-2,2,0,2,-2,0,0,2,-3,
%T 1,1,-3,2,0,0,-2,1,-2,-5,-2,1,-2,0,1,2,2,1,0,0,1,2,2,1,0,-2,-3,0,2,6,
%U 2,0,-3,-2,0,0,2,1,1,2,1,1,2,1,1,2,0,-1,-2,2,-2,1,-2,-7,-2,1,-2,2,-2,-1,0,2,-3,1,-5,-3,0,0,-3,-5,1,-3,2,0,1,-2,1,0,0,-2,2,0,2,-2,0,0,1,-2,1
%N Symmetric square array read by antidiagonals up.
%C The main diagonal is the Mobius function times the natural numbers A055615 (conjecture). For k>1 the first row is the Mertens function + 2 = A002321 + 2 (conjecture). There is one recurrence for n=1 and k=1, and another recurrence for n>1 and k>1.
%H M. Granvik, <a href="http://math.stackexchange.com/questions/50719/">Is this a recurrence for the Mertens function plus 2?</a>
%F T(1,1)=1 or 3, T(1,2)=2, T(2,1)=2, T(1,k)=(-T(n,k-1)-Sum_(i=2)^(k-1) of T(i,k))/(k+1)+T(n,k-1), T(n,1)=(-T(n-1,k)-Sum_(i=2)^(n-1) of T(n,i))/(n+1)+T(n-1,k), n>=k: -Sum_(i=1)^(k-1) of T(n-i,k), n<k: -Sum_(i=1)^(n-1) of T(k-i,n).
%e The array starts:
%e 1..2..1..1..0..1..0..0..0..1...
%e 2.-2..2.-2..2.-2..2.-2..2.-2...
%e 1..2.-3..1..2.-3..1..2.-3..1...
%e 1.-2..1..0..1.-2..1..0..1.-2...
%e 0..2..2..1.-5..0..2..2..1.-5...
%e 1.-2.-3.-2..0..6..1.-2.-3.-2...
%e 0..2..1..1..2..1.-7..0..2..1...
%e 0.-2..2..0..2.-2..0..0..0.-2...
%e 0..2.-3..1..1.-3..2..0..0..0...
%e 1.-2..1.-2.-5.-2..1.-2..0..10...
%t Clear[t]; t[1, 1] = 1; t[2, 1] = t[1, 2] = 2; t[n_Integer, k_Integer] := t[n, k] = Which[n == 1, (-t[n, k - 1] - Sum[t[i, k], {i, 2, k - 1}])/(k + 1) + t[n, k - 1], k == 1, (-t[n - 1, k] - Sum[t[n, i], {i, 2, n - 1}])/(n + 1) + t[n - 1, k], n >= k, -Sum[t[n - i, k], {i, 1, k - 1}], True, -Sum[t[k - i, n], {i, 1, n - 1}]];
%t nn = 12;
%t MatrixForm[Array[t, {nn, nn}]];
%t a = Flatten[Table[Reverse[Range[n]], {n, nn}]];
%t b = Flatten[Table[Range[n], {n, nn}]];
%t Table[t[a[[i]], b[[i]]], {i, 1, nn*(nn + 1)/2}]
%t (* Mats Granvik, _Olivier Gérard_, Jul 10 2011 *)
%t T[ n_, k_] := If[ n < 1 || k < 1, 0, If[ k > n, T[ k, n], T[n, k] = If[ k == 1, If[ n < 3, n, (-T[ n - 1, 1] - Sum[ T[ n, i], {i, 2, n - 1}]) / (n + 1) + T[ n - 1, 1]], If[ n > k, T[ k, Mod[ n, k, 1]], - Sum[ T[ n, i], {i, n - 1}]]]]]; (* _Michael Somos_, Jul 19 2011 *)
%o (Excel cell formula, European version, American version uses "," instead of ";")
%o =if(and(row()=1;column()=1);1;if(or(and(row()=1;column()=2);and(row()=2;column()=1));2;if(row()=1;(-indirect(address(row();column()-1))-sum(indirect(address(2;column())&":"&address(column()-1;column()))))/(column()+1)+indirect(address(row();column()-1));if(column()=1;(-indirect(address(row()-1;column()))-sum(indirect(address(row();2)&":"&address(row();row()-1))))/(row()+1)+indirect(address(row()-1;column()));if(row()>=column();-sum(indirect(address(row()-column()+1;column())&":"&address(row()-1; column())));-sum(indirect(address(column()-row()+1;row())&":"&address(column()-1;row()))))))))
%o (PARI) {T(n, k) = if( n<1 || k<1, 0, if( k>n, T(k, n), if( k==1, if( n<3, n, (-T(n-1, 1) -sum( i=2, n-1, T(n, i))) / (n+1) + T(n-1, 1)), if( n>k, T(k, (n-1)%k+1), -sum( i=1,n-1, T(n, i))))))}; /* _Michael Somos_, Jul 19 2011 */
%Y Cf. A002321, A055615.
%K sign,tabl
%O 1,2
%A _Mats Granvik_, Jul 09 2011