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.

A270970 Number of subsets of {1,...,n} with sum of elements equal to least common multiple of elements.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 9, 11, 14, 16, 17, 21, 22, 24, 28, 31, 32, 37, 38, 53, 56, 57, 58, 71, 72, 73, 77, 85, 86, 131, 132, 138, 141, 142, 143, 163, 164, 165, 167, 289, 290, 310, 311, 316, 403, 404, 405, 454, 455, 458, 460, 463, 464, 478, 479, 557, 559, 560, 561
Offset: 1

Views

Author

Michel Marcus, Mar 27 2016

Keywords

Comments

Similar to A270875 but also counts singletons, the trivial solutions.

Crossrefs

Programs

  • Mathematica
    Table[Length@ Select[Rest@ Subsets@ Range@ n, Total@ # == LCM @@ # &], {n, 22}] (* Michael De Vlieger, Mar 27 2016 *)
  • PARI
    a(n) = {nb = 0; S = vector(n, k, k); for (i = 0, 2^n - 1, ss = vecextract(S, i); if (sum(k=1, #ss, ss[k]) == lcm(ss), nb++);); nb;}

Formula

a(n) = A270875(n) + n.

Extensions

a(31)-a(58) from Hiroaki Yamanouchi, Mar 30 2016