login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A075189
Number of distinct primes in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3, ..., 1/n.
6
0, 1, 3, 6, 14, 20, 38, 74, 134, 232, 486, 526, 1078, 2036, 2505, 4762, 9929, 14598, 29831, 31521, 52223, 101123, 207892, 215796, 426772, 836665, 1640357, 1689653, 3401483
OFFSET
1,3
COMMENTS
Every prime is generated eventually. For the largest generated prime, see A075226. For the smallest odd prime not generated, see A075227.
A217712(n) = number of primes occurring exactly once as numerators among the 2^n sums. - Reinhard Zumkeller, Jun 02 2013
EXAMPLE
a(3) = 3 because 3 sums yield distinct prime numerators: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6.
MATHEMATICA
Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[lst={}; prms={}; i=0; n=1, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], prms=Union[prms, {k}]]]; AppendTo[lst, Length[prms]]]; lst
PROG
(Haskell)
import Data.Ratio ((%), numerator)
import Data.Set (Set, empty, fromList, toList, union, size)
a075189 n = a075189_list !! (n-1)
a075189_list = f 1 empty empty where
f x s s1 = size s1' : f (x + 1) (s `union` fromList hs) s1' where
s1' = s1 `union` fromList
(filter ((== 1) . a010051') $ map numerator hs)
hs = map (+ 1 % x) $ 0 : toList s
-- Reinhard Zumkeller, May 28 2013
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
T. D. Noe, Sep 08 2002
EXTENSIONS
Terms a(21)-a(29) by Reinhard Zumkeller, May 28 2013
STATUS
approved