A075189 Number of distinct primes in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3, ..., 1/n.
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, 3471770, 6868800, 13470379, 23182192, 45792615, 47136366
Offset: 1
Examples
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.
Programs
-
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
-
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
Extensions
a(21)-a(29) from Reinhard Zumkeller, May 28 2013
a(30)-a(35) from Sean A. Irvine, Feb 10 2025
Comments