login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A217712 Number of primes occurring exactly once as numerators in sums generated from the set 1, 1/2, 1/3,..., 1/n. 5

%I #10 Jun 02 2013 16:00:33

%S 0,1,3,3,11,13,27,54,106,168,378,142,733,1597,1283,3418,8204,10112,

%T 24644,7829,32866,78136,178741,37002,256392,650596,1402914,286854,

%U 2053463

%N Number of primes occurring exactly once as numerators in sums generated from the set 1, 1/2, 1/3,..., 1/n.

%C 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.

%e For n=3 there are the following fractions as sums of 1, 1/2 and 1/3:

%e {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;

%e 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:

%e A075188(4) = #{7/12, 3/4, 5/6, 13/12, 5/4, 3/2, 19/12, 7/4, 11/6} = 9,

%e A075189(4) = #{3, 5, 7, 11, 13, 19} = 6,

%e a(4) = #{11, 13, 19} = 3.

%o (Haskell)

%o import Data.Ratio ((%), numerator)

%o import Data.Set (Set, empty, fromList, toList, union, size)

%o import Data.Set (member, delete, insert)

%o a217712 n = a217712_list !! (n-1)

%o a217712_list = f 1 empty empty where

%o f x s s1 = size s1' : f (x + 1) (s `union` fromList hs) s1' where

%o s1' = g s1 $ filter ((== 1) . a010051') $ map numerator hs

%o g v [] = v

%o g v (w:ws) | w `member` v = g (delete w v) ws

%o | otherwise = g (insert w v) ws

%o hs = map (+ 1 % x) $ 0 : toList s

%Y Cf. A010051.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Jun 02 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:38 EDT 2024. Contains 371970 sequences. (Running on oeis4.)