login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124961 Triangle read by rows: T(n,k) = mobius(k)*T(n-1,k) + T(n-1,k-1). 1
1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 2, -1, 1, 1, 1, -2, 2, -2, 1, 1, 0, 3, -2, 4, -1, 1, 1, 1, -3, 3, -6, 3, -2, 1, 1, 0, 4, -3, 9, -3, 5, -2, 1, 1, 1, -4, 4, -12, 6, -8, 5, -2, 1, 1, 0, 5, -4, 16, -6, 14, -8, 5, -1, 1, 1, 1, -5, 5, -20, 10, -20, 14, -8, 4, -2, 1, 1, 0, 6, -5, 25, -10, 30, -20, 14, -4, 6, -2, 1, 1, 1, -6, 6, -30, 15, -40, 30, -20, 10 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,13
LINKS
EXAMPLE
Triangle starts:
1;
1, 1;
1, 0, 1;
1, 1, -1, 1;
1, 0, 2, -1, 1;
1, 1, -2, 2, -2, 1;
MAPLE
with(numtheory): T:=proc(n, k): if n=1 and k=1 then 1 elif k<1 or k>n then 0 else mobius(k)*T(n-1, k)+T(n-1, k-1) fi end: for n from 1 to 14 do seq(T(n, k), k=1..n) od; # yields sequence in triangular form
MATHEMATICA
T[n_, k_]:= T[n, k]= If[n==1 && k==1, 1, If[k<1 || k>n, 0, MoebiusMu[k]* T[n-1, k] + T[n-1, k-1] ]]; Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Nov 19 2019 *)
PROG
(PARI) T(n, k) = if(k==1 || k==n, 1, if(k<1 || k>n, 0, moebius(k)*T(n-1, k) + T(n-1, k-1) ));
for(n=1, 10, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Nov 19 2019
(Magma)
function T(n, k)
if k lt 1 or k gt n then return 0;
elif n eq 1 and k eq 1 then return 1;
else return MoebiusMu(k)*T(n-1, k) + T(n-1, k-1);
end if;
return T;
end function;
[T(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 19 2019
(Sage)
@CachedFunction
def T(n, k):
if (k<1 or k>n): return 0
elif (n==1 and k==1): return 1
else: return moebius(k)*T(n-1, k) + T(n-1, k-1)
[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 19 2019
CROSSREFS
Cf. A008683.
Sequence in context: A277824 A265120 A329621 * A008967 A345971 A211355
KEYWORD
sign,tabl
AUTHOR
Gary W. Adamson, Nov 13 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 29 2006
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 08:01 EDT 2024. Contains 371265 sequences. (Running on oeis4.)