

A111233


Number of nonempty subsets of {1, 1/2, 1/3, ..., 1/n} that sum to an integer.


2



1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11, 11, 11, 21, 21, 43, 43, 43, 43, 83, 83, 83, 83, 255, 255, 449, 449, 449, 895, 895, 1407, 2111, 2111, 2111, 2111, 4159, 4159, 8319, 8319
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

If the subset was {1/2, 1/3, 1/4, ..., 1/n}, that is the subset is lacking the element 1, than the sequence would be (A111233(n)1)/2.  Robert G. Wilson v, Sep 23 2006


LINKS

Table of n, a(n) for n=1..43.


FORMULA

a(p^e) = a(p^e1).  Robert G. Wilson v, Sep 23 2006


EXAMPLE

1, 1/2 + 1/3 + 1/6 = 1 and 1 + 1/2 + 1/3 + 1/6 = 2 are integers, so a(6)=3.


MATHEMATICA

Needs["DiscreteMath`Combinatorica`"]
f[1] = 1; f[n_] := Block[{c = 0, k = 2, lmt = 2^n/2, int = Range[2, n]}, While[k < lmt, If[IntegerQ[Plus @@ (1/NthSubset[k, int])], c++ ]; k++ ]; 2c+1];
Do[Print[{n, f[n] // Timing}], {n, 40}]
(* Robert G. Wilson v, Sep 23 2006 *)


CROSSREFS

Sequence in context: A210509 A216944 A178832 * A210746 A283986 A105159
Adjacent sequences: A111230 A111231 A111232 * A111234 A111235 A111236


KEYWORD

nonn,hard,more


AUTHOR

John W. Layman, Oct 28 2005


EXTENSIONS

More terms from Robert G. Wilson v, Sep 23 2006


STATUS

approved



