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”).

A217712
Number of primes occurring exactly once as numerators in sums generated from the set 1, 1/2, 1/3,..., 1/n.
5
0, 1, 3, 3, 11, 13, 27, 54, 106, 168, 378, 142, 733, 1597, 1283, 3418, 8204, 10112, 24644, 7829, 32866, 78136, 178741, 37002, 256392, 650596, 1402914, 286854, 2053463
OFFSET
1,3
COMMENTS
For information about how often the numerator of the generated sums is prime, see A075188 and A075189; for the largest generated prime, see A075226; for the smallest odd prime not generated, see A075227.
EXAMPLE
For n=3 there are the following fractions as sums of 1, 1/2 and 1/3:
{1/3, 1/2, 5/6, 1, 4/3, 3/2, 11/6}, three numerators are prime and they occur exactly once, therefore a(3) = A075188(3) = A075189(3) = #{3, 5, 11} = 3;
n=4: adding 1/4 to the previous fractions gives together: 1/4, 1/3, 1/2, 1/3+1/4=7/12, 1/2+1/4=3/4, 5/6, 1, 5/6+1/4=13/12, 1+1/4=5/4, 4/3, 3/2, 4/3+1/4=19/12, 3/2+1/4=7/4, 11/6 and 11/6+1/4=25/12:
A075188(4) = #{7/12, 3/4, 5/6, 13/12, 5/4, 3/2, 19/12, 7/4, 11/6} = 9,
A075189(4) = #{3, 5, 7, 11, 13, 19} = 6,
a(4) = #{11, 13, 19} = 3.
PROG
(Haskell)
import Data.Ratio ((%), numerator)
import Data.Set (Set, empty, fromList, toList, union, size)
import Data.Set (member, delete, insert)
a217712 n = a217712_list !! (n-1)
a217712_list = f 1 empty empty where
f x s s1 = size s1' : f (x + 1) (s `union` fromList hs) s1' where
s1' = g s1 $ filter ((== 1) . a010051') $ map numerator hs
g v [] = v
g v (w:ws) | w `member` v = g (delete w v) ws
| otherwise = g (insert w v) ws
hs = map (+ 1 % x) $ 0 : toList s
CROSSREFS
Cf. A010051.
Sequence in context: A136123 A045495 A045494 * A321678 A027416 A281905
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 02 2013
STATUS
approved