cp's OEIS Frontend

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.

A226037 a(n) = Sum_{c in P(n)} lcm(c) where P(n) is the set of all subsets of {1,2,...,n}.

This page as a plain text file.
%I A226037 #26 Sep 05 2023 23:01:51
%S A226037 1,2,6,24,88,528,1392,11136,41856,192192,516032,6192384,13270272,
%T A226037 185783808,511526400,1163742720,4403449344,79262088192,199280729088,
%U A226037 3985614581760,8463108648960,19276630732800,54618972549120,1310855341178880,2751134770298880,17228042511482880
%N A226037 a(n) = Sum_{c in P(n)} lcm(c) where P(n) is the set of all subsets of {1,2,...,n}.
%H A226037 Alois P. Heinz, <a href="/A226037/b226037.txt">Table of n, a(n) for n = 0..60</a>
%F A226037 a(n) = Sum_{k=0..n} Sum_{c in binomial(n,k)} lcm(c) where C(n,k) are the combinations of n with size k.
%e A226037 a(4) = lcm{} + lcm{1} + lcm{2} + lcm{3} + lcm{4} + lcm{1,2} + lcm{1,3} + lcm{1,4} + lcm{2,3} + lcm{2,4} + lcm{3,4} + lcm{1,2,3} + lcm{1,2,4} + lcm{1,3,4} + lcm{2,3,4} + lcm{1,2,3,4} =
%e A226037   1 + 1 + 2 + 3 + 4 + 2 + 3 + 4 + 6 + 4 + 12 + 6 + 4 + 12 + 12 + 12 = 88.
%p A226037 with(combstruct):
%p A226037 A226037 := proc(n) local R, c; R := 0; c := iterstructs(Combination(n)):
%p A226037 while not finished(c) do R := R + ilcm(op(nextstruct(c))) od; R end: seq(A226037(n), n=0..25);
%p A226037 # second Maple program:
%p A226037 b:= proc(n, m) option remember; `if`(n=0, m,
%p A226037       b(n-1, ilcm(m, n))+b(n-1, m))
%p A226037     end:
%p A226037 a:= n-> b(n, 1):
%p A226037 seq(a(n), n=0..25);  # _Alois P. Heinz_, Sep 05 2023
%t A226037 a[n_] := Total[LCM @@@ Rest[Subsets[Range[n]]]] + 1; Table[Print[an = a[n]]; an, {n, 0, 25}] (* _Jean-François Alcover_, Jan 15 2014 *)
%o A226037 (Sage) # (After _Alois P. Heinz_)
%o A226037 @CachedFunction
%o A226037 def C(n, k):
%o A226037     if k == 0: return [1]
%o A226037     w = C(n-1, k) if k < n else [0]
%o A226037     return w + [lcm(c,n) for c in C(n-1, k-1)]
%o A226037 def A226037(n): return add(add(C(n, k)) for k in (0..n))
%o A226037 [A226037(n) for n in (0..20)]
%Y A226037 Row sums of triangle A181853.
%K A226037 nonn
%O A226037 0,2
%A A226037 _Peter Luschny_, Jul 30 2013