login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A196720 Number of subsets of {1..n} (including empty set) such that the pairwise GCDs of elements are not distinct. 6
1, 2, 4, 8, 13, 25, 33, 61, 81, 116, 140, 256, 282, 530, 606, 692, 823, 1551, 1653, 3173, 3391, 3805, 4177, 8049, 8345, 11524, 12508, 15294, 16204, 31692, 32048, 63280, 70834, 77224, 82048, 91686, 93597, 185245, 196109, 212359, 218223, 432495, 436031, 867647 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

All pairwise GCDs of each subset are equal if there are any.

a(n) >= A084422(n).

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..60

EXAMPLE

a(5) = 25: {}, {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {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}, {1,2,3,5}, {1,3,4,5}.

MAPLE

b:= proc(n, s) local sn, m;

      m:= nops(s);

      sn:= [s[], n];

      `if`(n<1, 1, b(n-1, s) +`if`(1 >= nops(({seq(seq(

           igcd(sn[i], sn[j]), j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))

    end:

a:= proc(n) option remember;

      b(n-1, [n]) +`if`(n=0, 0, a(n-1))

    end:

seq(a(n), n=0..20);

MATHEMATICA

b[n_, s_] := b[n, s] = With[{m = Length[s], sn = Append[s, n]}, If[n<1, 1, b[n-1, s] + If[1 >= Length[ Union @ Flatten @ Table[ Table[ GCD[ sn[[i]], sn[[j]]], {j, i+1, m+1}], {i, 1, m}]], b[n-1, sn], 0]]];

a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]];

Table[a[n], {n, 0, 20}] (* Jean-Fran├žois Alcover, Apr 06 2017, translated from Maple *)

CROSSREFS

Cf. A143823, A196719, A196721, A196722, A196723, A196724.

Sequence in context: A262569 A248876 A102704 * A212906 A043774 A043777

Adjacent sequences:  A196717 A196718 A196719 * A196721 A196722 A196723

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Oct 05 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 12 18:58 EDT 2021. Contains 342932 sequences. (Running on oeis4.)