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-10 of 17 results. Next

A186973 Number of subsets of {1, 2, ..., n} containing n and having pairwise coprime elements; also row sums of A186972.

Original entry on oeis.org

1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 248, 48, 72, 112, 728, 64, 1520, 192, 384, 256, 3872, 256, 3168, 736, 2752, 832, 15488, 256, 31232, 7424, 6272, 4096, 9600, 1792, 91648, 9344, 16000, 5632, 214272, 3072, 431616, 37376, 38912, 43008, 982528
Offset: 1

Views

Author

Alois P. Heinz, Mar 01 2011

Keywords

Examples

			a(6) = 4 because there are 4 subsets of {1,2,3,4,5,6} containing 6 and having pairwise coprime elements: {6}, {1,6}, {5,6}, {1,5,6}.
		

Crossrefs

Cf. A186971, A186972, A186994. Rightmost elements in rows of triangle A186975.

Programs

  • Maple
    with(numtheory):
    s:= proc(m, r) option remember; mul(`if`(i mul(ilog[j](n), j={ithprime(i)$i=1..pi(n)} minus factorset(n)):
    b:= proc(t, n, k) option remember; local c, d, h;
          if k=0 or k>n 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
             end; c
          fi
        end:
    a:= n-> h(n) + add(b(s(n, n), n, k), k=1..g(n)-1):
    seq(a(n), n=1..50);
  • Mathematica
    s[m_, r_] := s[m, r] = Product[If[in, 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[Sum[t[n, k], {k, 1, a[n]}], {n, 1, 50}] (* Jean-François Alcover, Dec 04 2014, after Alois P. Heinz *)

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

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 5, 2, 5, 9, 7, 2, 6, 11, 8, 2, 7, 17, 19, 10, 2, 8, 21, 25, 14, 3, 9, 27, 37, 24, 6, 10, 31, 42, 26, 6, 11, 41, 73, 68, 32, 6, 12, 45, 79, 72, 33, 6, 13, 57, 124, 151, 105, 39, 6, 14, 63, 138, 167, 114, 41, 6, 15, 71, 159, 192, 128, 44, 6
Offset: 1

Views

Author

Alois P. Heinz, Mar 02 2011

Keywords

Comments

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

Examples

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

Crossrefs

Row sums give A187106.
Rightmost terms of rows give A319187.

Programs

  • Maple
    with(numtheory):
    s:= proc(m, r) option remember; mul(`if`(i pi(n) +1:
    b:= proc(t, n, k) option remember; local c, d, h;
          if k=0 or k>n 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) +`if`(n<2, 0, T(n-1, 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_] := PrimePi[n]+1; 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] + If[n < 2, 0, t[n-1, k]]; Table[Table[t[n, k], { k, 1, a[n]}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

Formula

T(n,k) = Sum_{i=1..n} A186972(i,k).

A163767 a(n) = tau_{n}(n) = number of ordered n-factorizations of n.

Original entry on oeis.org

1, 2, 3, 10, 5, 36, 7, 120, 45, 100, 11, 936, 13, 196, 225, 3876, 17, 3078, 19, 4200, 441, 484, 23, 62400, 325, 676, 3654, 11368, 29, 27000, 31, 376992, 1089, 1156, 1225, 443556, 37, 1444, 1521, 459200, 41, 74088, 43, 43560, 46575, 2116, 47, 11995200, 1225
Offset: 1

Views

Author

Paul D. Hanna, Aug 04 2009

Keywords

Comments

Also the number of length n - 1 chains of divisors of n. - Gus Wiseman, May 07 2021

Examples

			Successive Dirichlet self-convolutions of the all 1's sequence begin:
(1),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,... (A000012)
1,(2),2,3,2,4,2,4,3,4,2,6,2,4,4,5,... (A000005)
1,3,(3),6,3,9,3,10,6,9,3,18,3,9,9,15,... (A007425)
1,4,4,(10),4,16,4,20,10,16,4,40,4,16,16,35,... (A007426)
1,5,5,15,(5),25,5,35,15,25,5,75,5,25,25,70,... (A061200)
1,6,6,21,6,(36),6,56,21,36,6,126,6,36,36,126,... (A034695)
1,7,7,28,7,49,(7),84,28,49,7,196,7,49,49,210,... (A111217)
1,8,8,36,8,64,8,(120),36,64,8,288,8,64,64,330,... (A111218)
1,9,9,45,9,81,9,165,(45),81,9,405,9,81,81,495,... (A111219)
1,10,10,55,10,100,10,220,55,(100),10,550,10,100,... (A111220)
1,11,11,66,11,121,11,286,66,121,(11),726,11,121,... (A111221)
1,12,12,78,12,144,12,364,78,144,12,(936),12,144,... (A111306)
...
where the main diagonal forms this sequence.
From _Gus Wiseman_, May 07 2021: (Start)
The a(1) = 1 through a(5) = 5 chains of divisors:
  ()  (1)  (1/1)  (1/1/1)  (1/1/1/1)
      (2)  (3/1)  (2/1/1)  (5/1/1/1)
           (3/3)  (2/2/1)  (5/5/1/1)
                  (2/2/2)  (5/5/5/1)
                  (4/1/1)  (5/5/5/5)
                  (4/2/1)
                  (4/2/2)
                  (4/4/1)
                  (4/4/2)
                  (4/4/4)
(End)
		

Crossrefs

Main diagonal of A077592.
Diagonal n = k + 1 of the array A334997.
The version counting all multisets of divisors (not just chains) is A343935.
A000005 counts divisors.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A001221 counts distinct prime factors.
A001222 counts prime factors with multiplicity.
A067824 counts strict chains of divisors starting with n.
A122651 counts strict chains of divisors summing to n.
A146291 counts divisors of n with k prime factors (with multiplicity).
A167865 counts strict chains of divisors > 1 summing to n.
A253249 counts nonempty strict chains of divisors of n.
A251683/A334996 count strict nonempty length-k divisor chains from n to 1.
A337255 counts strict length-k chains of divisors starting with n.
A339564 counts factorizations with a selected factor.
A343662 counts strict length-k chains of divisors (row sums: A337256).
Cf. A060690.

Programs

  • Mathematica
    Table[Times@@(Binomial[#+n-1,n-1]&/@FactorInteger[n][[All,2]]),{n,1,50}] (* Enrique Pérez Herrero, Dec 25 2013 *)
  • PARI
    {a(n,m=n)=if(n==1,1,if(m==1,1,sumdiv(n,d,a(d,1)*a(n/d,m-1))))}
    
  • Python
    from math import prod, comb
    from sympy import factorint
    def A163767(n): return prod(comb(n+e-1,e) for e in factorint(n).values()) # Chai Wah Wu, Jul 05 2024

Formula

a(p) = p for prime p.
a(n) = n^k when n is the product of k distinct primes (conjecture).
a(n) = n-th term of the n-th Dirichlet self-convolution of the all 1's sequence.
a(2^n) = A060690(n). - Alois P. Heinz, Jun 12 2024

A187262 Irregular triangle T(n,k), n>=1, 1<=k<=A036234(n), read by rows: T(n,k) is the number of nonempty subsets of {1, 2, ..., n} having <=k pairwise coprime elements.

Original entry on oeis.org

1, 2, 3, 3, 6, 7, 4, 9, 11, 5, 14, 21, 23, 6, 17, 25, 27, 7, 24, 43, 53, 55, 8, 29, 54, 68, 71, 9, 36, 73, 97, 103, 10, 41, 83, 109, 115, 11, 52, 125, 193, 225, 231, 12, 57, 136, 208, 241, 247, 13, 70, 194, 345, 450, 489, 495, 14, 77, 215, 382, 496, 537, 543
Offset: 1

Views

Author

Alois P. Heinz, Mar 07 2011

Keywords

Comments

T(n,k) = T(n,k-1) for k>A036234(n). The triangle contains all values of T up to the last element of each row that is different from its predecessor.

Examples

			T(5,3) = 21 because there are 21 nonempty subsets of {1,2,3,4,5} having <=3 pairwise coprime elements: {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,5}, {3,4}, {3,5}, {4,5}, {1,2,3}, {1,2,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Irregular Triangle T(n,k) begins:
  1;
  2,  3;
  3,  6,  7;
  4,  9, 11;
  5, 14, 21, 23;
  6, 17, 25, 27;
  7, 24, 43, 53, 55;
		

Crossrefs

Rightmost elements of rows give A187106.

Formula

T(n,k) = Sum_{i=1..n,j=1..k} A186972(i,j).
T(n,k) = Sum_{j=1..k} A186974(n,j).
T(n,k) = Sum_{i=1..n} A186975(i,k).

A276187 Number of subsets of {1,..,n} of cardinality >= 2 such that the elements of each counted subset are pairwise coprime.

Original entry on oeis.org

0, 1, 4, 7, 18, 21, 48, 63, 94, 105, 220, 235, 482, 529, 600, 711, 1438, 1501, 3020, 3211, 3594, 3849, 7720, 7975, 11142, 11877, 14628, 15459, 30946, 31201, 62432, 69855, 76126, 80221, 89820, 91611, 183258, 192601, 208600, 214231, 428502, 431573, 863188, 900563
Offset: 1

Views

Author

Robert C. Lyons, Aug 23 2016

Keywords

Comments

n is prime if and only if a(n) = 2*a(n-1)+n-1. - Robert Israel, Aug 24 2016

Examples

			From _Gus Wiseman_, May 08 2021: (Start)
The a(2) = 1 through a(6) = 21 sets:
  {1,2}   {1,2}    {1,2}     {1,2}      {1,2}
          {1,3}    {1,3}     {1,3}      {1,3}
          {2,3}    {1,4}     {1,4}      {1,4}
         {1,2,3}   {2,3}     {1,5}      {1,5}
                   {3,4}     {2,3}      {1,6}
                  {1,2,3}    {2,5}      {2,3}
                  {1,3,4}    {3,4}      {2,5}
                             {3,5}      {3,4}
                             {4,5}      {3,5}
                            {1,2,3}     {4,5}
                            {1,2,5}     {5,6}
                            {1,3,4}    {1,2,3}
                            {1,3,5}    {1,2,5}
                            {1,4,5}    {1,3,4}
                            {2,3,5}    {1,3,5}
                            {3,4,5}    {1,4,5}
                           {1,2,3,5}   {1,5,6}
                           {1,3,4,5}   {2,3,5}
                                       {3,4,5}
                                      {1,2,3,5}
                                      {1,3,4,5}
(End)
		

Crossrefs

The case of pairs is A015614.
The indivisible instead of coprime version is A051026(n) - n.
Allowing empty sets and singletons gives A084422.
The relatively prime instead of pairwise coprime version is A085945(n) - 1.
Allowing all singletons gives A187106.
Allowing only the singleton {1} gives A320426.
Row sums of A320436, each minus one.
The maximal case is counted by A343659.
The version for sets of divisors is A343655(n) - 1.
A000005 counts divisors.
A186972 counts pairwise coprime k-sets containing n.
A186974 counts pairwise coprime k-sets.
A326675 ranks pairwise coprime non-singleton sets.

Programs

  • Maple
    f:= proc(S) option remember;
        local s, Sp;
        if S = {} then return 1 fi;
        s:= S[-1];
        Sp:= S[1..-2];
        procname(Sp) + procname(select(t -> igcd(t,s)=1, Sp))
    end proc:
    seq(f({$1..n}) - n - 1, n=1..50); # Robert Israel, Aug 24 2016
  • Mathematica
    f[S_] := f[S] = Module[{s, Sp}, If[S == {}, Return[1]]; s = S[[-1]]; Sp = S[[1;;-2]]; f[Sp] + f[Select[Sp, GCD[#, s] == 1&]]];
    Table[f[Range[n]] - n - 1, {n, 1, 50}] (* Jean-François Alcover, Sep 15 2022, after Robert Israel *)
  • PARI
    f(n,k=1)=if(n==1, return(2)); if(gcd(k,n)==1, f(n-1,n*k)) + f(n-1,k)
    a(n)=f(n)-n-1 \\ Charles R Greathouse IV, Aug 24 2016
  • Sage
    from sage.combinat.subsets_pairwise import PairwiseCompatibleSubsets
    def is_coprime(x, y): return gcd(x, y) == 1
    max_n = 40
    seq = []
    for n in range(1, max_n+1):
        P = PairwiseCompatibleSubsets(range(1,n+1), is_coprime)
        a_n = len([1 for s in P.list() if len(s) > 1])
        seq.append(a_n)
    print(seq)
    

Formula

a(n) = A320426(n) - 1. - Gus Wiseman, May 08 2021

Extensions

Name and example edited by Robert Israel, Aug 24 2016

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

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 3, 4, 1, 5, 10, 12, 1, 3, 4, 1, 7, 18, 26, 28, 1, 5, 11, 15, 16, 1, 7, 19, 29, 32, 1, 5, 10, 12, 1, 11, 42, 84, 110, 116, 1, 5, 11, 15, 16, 1, 13, 58, 137, 209, 242, 248, 1, 7, 21, 37, 46, 48, 1, 9, 30, 55, 69, 72, 1, 9, 33, 69, 98, 110, 112
Offset: 1

Views

Author

Alois P. Heinz, Mar 02 2011

Keywords

Comments

T(n,k) = T(n,k-1) for k>A186971(n). The triangle contains all values of T up to the last element of each row that is different from its predecessor.

Examples

			T(5,3) = 10 because there are 10 subsets of {1,2,3,4,5} containing n and having <=3 pairwise coprime elements: {5}, {1,5}, {2,5}, {3,5}, {4,5}, {1,2,5}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Triangle T(n,k) begins:
  1;
  1, 2;
  1, 3, 4;
  1, 3, 4;
  1, 5, 10, 12;
  1, 3, 4;
  1, 7, 18, 26, 28;
		

Crossrefs

Columns k=1-9 give: A000012, A039649 for n>1, A186987, A186988, A186989, A186990, A186991, A186992, A186993.
Rightmost elements of rows give A186973.

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) +`if`(k=0, 0, T(n, k-1))
        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]+If[k == 0, 0, t[n, k-1]]; Table[Table[t[n, k], {k, 1, a[n]}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 19 2013, translated from Maple *)

Formula

T(n,k) = Sum_{i=1..k} A186972(n,i).

A343662 Irregular triangle read by rows where T(n,k) is the number of strict length k chains of divisors of n, 0 <= k <= Omega(n) + 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 4, 5, 2, 1, 2, 1, 1, 4, 6, 4, 1, 1, 3, 3, 1, 1, 4, 5, 2, 1, 2, 1, 1, 6, 12, 10, 3, 1, 2, 1, 1, 4, 5, 2, 1, 4, 5, 2, 1, 5, 10, 10, 5, 1, 1, 2, 1, 1, 6, 12, 10, 3, 1, 2, 1, 1, 6, 12, 10, 3, 1, 4, 5, 2, 1, 4, 5, 2
Offset: 1

Views

Author

Gus Wiseman, May 01 2021

Keywords

Examples

			Triangle begins:
   1:  1  1
   2:  1  2  1
   3:  1  2  1
   4:  1  3  3  1
   5:  1  2  1
   6:  1  4  5  2
   7:  1  2  1
   8:  1  4  6  4  1
   9:  1  3  3  1
  10:  1  4  5  2
  11:  1  2  1
  12:  1  6 12 10  3
  13:  1  2  1
  14:  1  4  5  2
  15:  1  4  5  2
  16:  1  5 10 10  5  1
For example, row n = 12 counts the following chains:
  ()  (1)   (2/1)   (4/2/1)   (12/4/2/1)
      (2)   (3/1)   (6/2/1)   (12/6/2/1)
      (3)   (4/1)   (6/3/1)   (12/6/3/1)
      (4)   (4/2)   (12/2/1)
      (6)   (6/1)   (12/3/1)
      (12)  (6/2)   (12/4/1)
            (6/3)   (12/4/2)
            (12/1)  (12/6/1)
            (12/2)  (12/6/2)
            (12/3)  (12/6/3)
            (12/4)
            (12/6)
		

Crossrefs

Column k = 1 is A000005.
Row ends are A008480.
Row lengths are A073093.
Column k = 2 is A238952.
The case from n to 1 is A334996 or A251683 (row sums: A074206).
A non-strict version is A334997 (transpose: A077592).
The case starting with n is A337255 (row sums: A067824).
Row sums are A337256 (nonempty: A253249).
A001055 counts factorizations.
A001221 counts distinct prime factors.
A001222 counts prime factors with multiplicity.
A097805 counts compositions by sum and length.
A122651 counts strict chains of divisors summing to n.
A146291 counts divisors of n with k prime factors (with multiplicity).
A163767 counts length n - 1 chains of divisors of n.
A167865 counts strict chains of divisors > 1 summing to n.
A337070 counts strict chains of divisors starting with superprimorials.

Programs

  • Mathematica
    Table[Length[Select[Reverse/@Subsets[Divisors[n],{k}],And@@Divisible@@@Partition[#,2,1]&]],{n,15},{k,0,PrimeOmega[n]+1}]

A185953 Number of pairwise coprime triples of positive integers with largest element n (i.e., A015617(n) - A015617(n-1)).

Original entry on oeis.org

0, 0, 1, 1, 5, 1, 11, 6, 12, 5, 31, 6, 45, 14, 21, 24, 79, 15, 101, 27, 49, 37, 149, 28, 126, 56, 109, 57, 241, 28, 277, 106, 137, 100, 183, 62, 395, 128, 193, 102, 489, 65, 541, 165, 203, 189, 649, 116, 551, 170, 347, 231, 829, 147, 506, 234, 434, 307, 1027, 119, 1101, 364, 450, 412, 727
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2011

Keywords

References

  • Robert Israel, Posting to Sequence Fans Mailing List, Feb 06, 2011

Crossrefs

Cf. A015617. Row sums of triangle A186230. Column 3 of triangle A186972.

Programs

  • Mathematica
    a[n_] := Sum[Boole[GCD[a, n] == 1 && GCD[b, n] == 1 && GCD[a, b] == 1], {a, 1, n-2}, {b, a+1, n-1}]; Array[a, 100] (* Jean-François Alcover, Mar 05 2019, from PARI *)
  • PARI
    a(n)=sum(a=1,n-2,sum(b=a+1,n-1,gcd(a,n)==1&&gcd(b,n)==1&&gcd(a,b)==1)) \\ Charles R Greathouse IV, Apr 28 2015

A186994 Number of maximal subsets of {1, 2, ..., n} containing n and having pairwise coprime elements.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 6, 1, 6, 2, 3, 2, 8, 1, 8, 2, 4, 2, 8, 1, 8, 4, 8, 6, 24, 1, 24, 6, 10, 6, 15, 2, 30, 6, 10, 3, 30, 2, 30, 6, 5, 6, 30, 2, 30, 6, 20, 12, 60, 4, 30, 6, 20, 12, 60, 2, 60, 12, 10, 12, 36, 4, 72, 12, 24, 3, 72, 4, 72, 12, 12, 12, 36
Offset: 1

Views

Author

Alois P. Heinz, Mar 01 2011

Keywords

Comments

The elements of a maximal subset are 1, n, and powers of primes that have no common factor with n. The cardinalities of maximal subsets is A186971(n).

Examples

			a(5) = 2 because there are 2 maximal subsets of {1,2,3,4,5} containing 5 and having pairwise coprime elements: {1,2,3,5}, {1,3,4,5}.
a(9) = 3, the maximal subsets are {1,2,5,7,9}, {1,4,5,7,9}, {1,5,7,8,9}.
		

Crossrefs

Cf. A186971. Rightmost elements in rows of A186972.

Programs

  • Maple
    with(numtheory):
    a:= n-> mul(ilog[j](n), j={ithprime(i)$i=1..pi(n)} minus factorset(n)):
    seq(a(n), n=1..200);
  • Mathematica
    a[n_] := Product[Log[p, n] // Floor, {p, Select[Range[n-1], PrimeQ[#] && GCD[n, #] == 1&]}]; Table[a[n], {n, 1, 200}] (* Jean-François Alcover, Dec 09 2014, after Alois P. Heinz *)

Formula

a(n) = Product_{p in Primes with p

A185348 Number of ordered quadruples of distinct pairwise coprime positive integers with largest element n; also first differences of A015623.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 8, 4, 10, 2, 42, 4, 79, 16, 25, 36, 183, 20, 277, 50, 100, 70, 491, 56, 399, 139, 340, 146, 1016, 56, 1285, 398, 493, 342, 706, 184, 2150, 501, 807, 363, 2968, 210, 3522, 775, 935, 904, 4620, 508, 3732, 842, 2011, 1255, 6684, 728, 3355, 1304, 2785, 1877, 9141, 546
Offset: 1

Author

Alois P. Heinz, Feb 15 2011

Keywords

Examples

			a(4) = 0 because there is only one ordered quadruple of distinct positive integers with largest element 4, (1,2,3,4), but the elements are not pairwise coprime, 2 and 4 have a common factor >1.
a(8) = 4 because there are only four ordered quadruples of distinct pairwise coprime positive integers with largest element 8: (1,3,5,8), (1,3,7,8), (1,5,7,8), (3,5,7,8).
		

Crossrefs

Cf. A015623, A185953. Column 4 of triangle A186972.
Showing 1-10 of 17 results. Next