This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A075189 #17 Feb 10 2025 23:55:04 %S A075189 0,1,3,6,14,20,38,74,134,232,486,526,1078,2036,2505,4762,9929,14598, %T A075189 29831,31521,52223,101123,207892,215796,426772,836665,1640357,1689653, %U A075189 3401483,3471770,6868800,13470379,23182192,45792615,47136366 %N A075189 Number of distinct primes in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3, ..., 1/n. %C A075189 Every prime is generated eventually. For the largest generated prime, see A075226. For the smallest odd prime not generated, see A075227. %C A075189 A217712(n) = number of primes occurring exactly once as numerators among the 2^n sums. - _Reinhard Zumkeller_, Jun 02 2013 %e A075189 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. %t A075189 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 %o A075189 (Haskell) %o A075189 import Data.Ratio ((%), numerator) %o A075189 import Data.Set (Set, empty, fromList, toList, union, size) %o A075189 a075189 n = a075189_list !! (n-1) %o A075189 a075189_list = f 1 empty empty where %o A075189 f x s s1 = size s1' : f (x + 1) (s `union` fromList hs) s1' where %o A075189 s1' = s1 `union` fromList %o A075189 (filter ((== 1) . a010051') $ map numerator hs) %o A075189 hs = map (+ 1 % x) $ 0 : toList s %o A075189 -- _Reinhard Zumkeller_, May 28 2013 %Y A075189 Cf. A001008, A075135, A075188, A075226, A075227. %Y A075189 Cf. A010051. %K A075189 nice,nonn %O A075189 1,3 %A A075189 _T. D. Noe_, Sep 08 2002 %E A075189 a(21)-a(29) from _Reinhard Zumkeller_, May 28 2013 %E A075189 a(30)-a(35) from _Sean A. Irvine_, Feb 10 2025