cp's OEIS Frontend

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.

A075188 Number of times that the numerator of a sum generated from the set 1, 1/2, 1/3,..., 1/n is prime.

This page as a plain text file.
%I A075188 #18 Feb 10 2025 20:41:14
%S A075188 0,1,3,9,19,43,79,162,307,607,1075,2186,3872,7573,15101,29139,52295,
%T A075188 104953,189915,379275,754081,1462115,2675851,5351541,10254019,
%U A075188 19987942,38901233,77620568,144021667,288428481,537642772,1056802340,2113152353,4138261885
%N A075188 Number of times that the numerator of a sum generated from the set 1, 1/2, 1/3,..., 1/n is prime.
%C A075188 Note that for each n there are only 2^(n-1) new sums to consider. Surprisingly, nearly half of the sums have a prime numerator. For the number of distinct primes, see A075189. For the largest generated prime, see A075226. For the smallest odd prime not generated, see A075227.
%C A075188 A217712(n) = number of primes occurring exactly once as numerators. - _Reinhard Zumkeller_, Jun 02 2013
%e A075188 a(3) = 3 because 3 sums yield prime numerators: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6.
%t A075188 Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[cnt=0; lst={}; 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], cnt++ ]]; AppendTo[lst, cnt]]; lst
%o A075188 (Haskell)
%o A075188 import Data.Ratio (numerator)
%o A075188 a075188 n = a075188_list !! (n-1)
%o A075188 a075188_list = f 1 [] where
%o A075188    f x hs = (length $ filter ((== 1) . a010051') (map numerator hs')) :
%o A075188             f (x + 1) hs' where hs' = hs ++ map (+ recip x) (0 : hs)
%o A075188 -- _Reinhard Zumkeller_, May 28 2013
%Y A075188 Cf. A001008, A075135, A075189, A075226, A075227.
%Y A075188 Cf. A010051.
%K A075188 nice,nonn
%O A075188 1,3
%A A075188 _T. D. Noe_, Sep 08 2002
%E A075188 a(21)-a(25) by _Reinhard Zumkeller_, May 28 2013
%E A075188 a(26)-a(31) from _Chai Wah Wu_, Feb 14 2022
%E A075188 a(32)-a(34) from _Sean A. Irvine_, Feb 10 2025