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.

Showing 1-3 of 3 results.

A186972 Irregular triangle T(n,k), n>=1, 1<=k<=A186971(n), read by rows: T(n,k) is the number of k-element subsets of {1, 2, ..., n} containing n and having pairwise coprime elements.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 4, 5, 2, 1, 2, 1, 1, 6, 11, 8, 2, 1, 4, 6, 4, 1, 1, 6, 12, 10, 3, 1, 4, 5, 2, 1, 10, 31, 42, 26, 6, 1, 4, 6, 4, 1, 1, 12, 45, 79, 72, 33, 6, 1, 6, 14, 16, 9, 2, 1, 8, 21, 25, 14, 3, 1, 8, 24, 36, 29, 12, 2, 1, 16, 79, 183, 228, 157, 56, 8, 1, 6, 15, 20, 15, 6, 1
Offset: 1

Views

Author

Alois P. Heinz, Mar 01 2011

Keywords

Comments

T(n,k) = 0 for k>A186971(n). The triangle contains all positive values of T.

Examples

			T(5,3) = 5 because there are 5 3-element subsets of {1,2,3,4,5} containing 5 and having pairwise coprime elements: {1,2,5}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Irregular Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2,  1;
  1, 2,  1;
  1, 4,  5, 2;
  1, 2,  1;
  1, 6, 11, 8, 2;
		

Crossrefs

Columns k=1-10 give: A000012, A000010 (for n>1), A185953, A185348, A186976, A186977, A186978, A186979, A186980, A186981.
Rightmost elements of rows give A186994.
Row sums are A186973.
Cf. A186971.

Programs

  • Maple
    with(numtheory):
    s:= proc(m,r) option remember; mul(`if`(in then 0
        elif k=1 then 1
        elif k=2 and t=n then `if`(n<2, 0, phi(n))
        else c:= 0;
             d:= 2-irem(t,2);
             for h from 1 to n-1 by d do
               if igcd(t, h)=1 then c:= c +b(s(t*h, h), h, k-1) fi
             od; c
          fi
    end:
    T:= proc(n,k) option remember; b(s(n,n),n,k) end:
    seq(seq(T(n, k), k=1..a(n)), n=1..20);
  • Mathematica
    s[m_, r_] := s[m, r] = Product[If[i < r, i, 1], {i, FactorInteger[m][[All, 1]]}]; a[n_] := a[n] = If[n < 4, n, PrimePi[n] - Length[FactorInteger[n]]+2]; b[t_, n_, k_] := b[t, n, k] = Module[{c, d, h}, Which[k == 0 || k > n, 0, k == 1, 1, k == 2 && t == n, If[n < 2, 0, EulerPhi[n]], True, c = 0; d = 2-Mod[t, 2]; For[h = 1, h <= n-1, h = h+d, If[GCD[t, h] == 1, c = c+b[s[t*h, h], h, k-1]]]; c]]; t[n_, k_] := t[n, k] = b[s[n, n], n, k]; Table[Table[t[n, k], {k, 1, a[n]}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

A186989 Number of subsets of {1, 2, ..., n} containing n and having <=5 pairwise coprime elements.

Original entry on oeis.org

1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 110, 16, 209, 46, 69, 98, 507, 57, 828, 141, 277, 193, 1591, 163, 1289, 413, 1101, 441, 3785, 163, 5164, 1479, 1736, 1187, 2540, 609, 9561, 1879, 3086, 1304, 14298, 738, 18084, 3322, 3913, 3888, 25430
Offset: 1

Views

Author

Alois P. Heinz, Mar 03 2011

Keywords

Examples

			a(10) = 12 because there are 12 subsets of {1, 2, ..., 10} containing 10 and having <=5 pairwise coprime elements: {10}, {1,10}, {3,10}, {7,10}, {9,10}, {1,3,10}, {1,7,10}, {1,9,10}, {3,7,10}, {7,9,10}, {1,3,7,10}, {1,7,9,10}. There is no subset with exactly 5 elements here.
		

Crossrefs

Column 5 of triangle A186975. Sum of A186988 and A186976.

A015698 Number of 5-tuples of different integers from [ 1,n ] with no common factors among pairs.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 3, 6, 6, 32, 33, 105, 114, 128, 157, 385, 400, 831, 886, 1001, 1076, 2004, 2074, 2817, 3022, 3655, 3880, 6379, 6449, 10020, 10978, 12063, 12791, 14417, 14767, 21746, 22977, 25038, 25860, 36660, 37110, 51088, 53449, 56199
Offset: 1

Views

Author

Keywords

Crossrefs

Column 5 of triangle A186974. Partial sums of A186976.
Showing 1-3 of 3 results.