The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A180009 Triangle T(n,k), read by rows, T(n,1) = mu(n), T(n,2) = T(n,k-1) - T(n-1,k), k > 2, T(n,k) = Sum_{i=1..k-1} ( T(n-i,k-1) - T(n-i,k) ). 2

%I

%S 1,-1,-1,-1,0,-1,0,0,0,-1,-1,-1,1,0,-1,1,2,-2,1,0,-1,-1,-3,2,-1,1,0,

%T -1,0,3,-1,1,-1,1,0,-1,0,-3,-1,-2,2,-1,1,0,-1,1,4,2,2,-3,2,-1,1,0,-1,

%U -1,-5,0,-1,1,-2,2,-1,1,0,-1,0,5,-3,2,1,0,-2,2,-1,1,0,-1,-1,-6,3,-4,0,0,1,-2,2,-1,1,0,-1

%N Triangle T(n,k), read by rows, T(n,1) = mu(n), T(n,2) = T(n,k-1) - T(n-1,k), k > 2, T(n,k) = Sum_{i=1..k-1} ( T(n-i,k-1) - T(n-i,k) ).

%H G. C. Greubel, <a href="/A180009/b180009.txt">Rows n = 1..100 of triangle, flattened</a>

%e Table begins:

%e 1;

%e -1, -1;

%e -1, 0, -1;

%e 0, 0, 0, -1;

%e -1, -1, 1, 0, -1;

%e 1, 2, -2, 1, 0, -1;

%e -1, -3, 2, -1, 1, 0, -1;

%e 0, 3, -1, 1, -1, 1, 0, -1;

%e 0, -3, -1, -2, 2, -1, 1, 0, -1;

%e 1, 4, 2, 2, -3, 2, -1, 1, 0, -1;

%e -1, -5, 0, -1, 1, -2, 2, -1, 1, 0, -1;

%e 0, 5, -3, 2, 1, 0, -2, 2, -1, 1, 0, -1;

%e -1, -6, 3, -4, 0, 0, 1, -2, 2, -1, 1, 0, -1;

%e 1, 7, -1, 3, 0, 2, -1, 1, -2, 2, -1, 1, 0, -1;

%e 1, -6, -1, -2, -2, -3, 1, 0, 1, -2, 2, -1, 1, 0, -1;

%p T:= proc(n,k) option remember;

%p if k<1 or k>n then 0

%p elif k=1 then NumberTheory[Moebius](n)

%p elif k=2 then T(n,k-1) - T(n-1,k)

%p else add( T(n-j,k-1) - T(n-j,k), j=1..k-1 )

%p fi; end;

%p seq(seq( T(n,k), k=1..n), n=1..15); # _G. C. Greubel_, Dec 17 2019

%t T[n_, k_]:= T[n, k]= If[k<1 || k>n, 0, If[k==1, MoebiusMu[n], If[k==2, T[n, k-1] - T[n-1, k], Sum[T[n-j, k-1] - T[n-j, k], {j, k-1}]]]]; Table[T[n, k], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Dec 17 2019 *)

%o (PARI) T(n,k) = if(k<1 || k>n, 0, if(k==1, moebius(n), if(k==2, T(n,k-1) - T(n-1,k), sum(j=1,k-1, T(n-j,k-1) - T(n-j,k)) ))); \\ _G. C. Greubel_, Dec 17 2019

%o (MAGMA)

%o function T(n,k)

%o if k lt 1 or k gt n then return 0;

%o elif k eq 1 then return MoebiusMu(n);

%o elif k eq 2 then return T(n,k-1) - T(n-1,k);

%o else return (&+[T(n-j,k-1) - T(n-j,k): j in [1..k-1]]);

%o end if; return T; end function;

%o [T(n,k): k in [1..n], n in [1..15]]; // _G. C. Greubel_, Dec 17 2019

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o if (k<1 or k>n): return 0

%o elif (k==1): return moebius(n)

%o elif (k==2): return T(n,k-1) - T(n-1,k)

%o else: return sum(T(n-j,k-1) - T(n-j, k) for j in (1..k-1))

%o [[T(n, k) for k in (1..n)] for n in (1..15)] # _G. C. Greubel_, Dec 17 2019

%o (GAP)

%o T:= function(n,k)

%o if k<1 or k>n then return 0;

%o elif k=1 then return MoebiusMu(n);

%o elif k=2 then return T(n,k-1) - T(n-1,k);

%o else return Sum([1..k-1], j-> T(n-j,k-1) - T(n-j,k) );

%o fi; end;

%o Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # _G. C. Greubel_, Dec 17 2019

%Y Cf. A008683, A180010.

%K sign,tabl

%O 1,17

%A _Mats Granvik_, Aug 06 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 27 21:12 EDT 2021. Contains 347698 sequences. (Running on oeis4.)