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 A075226 #25 Feb 16 2022 01:55:20 %S A075226 3,11,19,137,137,1019,2143,7129,7129,78167,81401,1085933,1111673, %T A075226 1165727,2364487,41325407,41325407,796326437,809074601,812400209, %U A075226 822981689,19174119571,19652175721,99554817251,100483070801 %N A075226 Largest prime in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3,..., 1/n. %C A075226 For the smallest odd prime not generated, see A075227. For information about how often the numerator of these sums is prime, see A075188 and A075189. The Mathematica program also prints the subset that yields the largest prime. For n <=20, the largest prime occurs in a sum of n-2, n-1, or n reciprocals. %H A075226 Chai Wah Wu, <a href="/A075226/b075226.txt">Table of n, a(n) for n = 2..441</a> (terms 2..100 from Martin Fuller) %H A075226 Martin Fuller, <a href="/A075226/a075226.gp.txt">PARI program</a> %e A075226 a(3) =11 because 11 is largest prime numerator in the three sums that yield primes: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6. %t A075226 Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[t={}; lst={}; mx=0; i=0; n=2, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], If[k>mx, t=s]; mx=Max[mx, k]]]; Print[n, " ", t]; AppendTo[lst, mx]]; lst %t A075226 Table[Max[Select[Numerator[Total/@Subsets[1/Range[n],{2,2^n}]],PrimeQ]],{n,2,30}] (* The program will take a long time to run. *) (* _Harvey P. Dale_, Jan 08 2019 *) %o A075226 (Haskell) %o A075226 import Data.Ratio (numerator) %o A075226 a075226 n = a075226_list !! (n-1) %o A075226 a075226_list = f 2 [recip 1] where %o A075226 f x hs = (maximum $ filter ((== 1) . a010051') (map numerator hs')) : %o A075226 f (x + 1) hs' where hs' = hs ++ map (+ recip x) hs %o A075226 -- _Reinhard Zumkeller_, May 28 2013 %o A075226 (PARI) See Fuller link. %o A075226 (Python) %o A075226 from math import gcd, lcm %o A075226 from itertools import combinations %o A075226 from sympy import isprime %o A075226 def A075226(n): %o A075226 m = lcm(*range(1,n+1)) %o A075226 c, mlist = 0, tuple(m//i for i in range(1,n+1)) %o A075226 for l in range(n,-1,-1): %o A075226 if sum(mlist[:l]) < c: %o A075226 break %o A075226 for p in combinations(mlist,l): %o A075226 s = sum(p) %o A075226 s //= gcd(s,m) %o A075226 if s > c and isprime(s): %o A075226 c = s %o A075226 return c # _Chai Wah Wu_, Feb 14 2022 %Y A075226 Cf. A001008, A075135, A075188, A075189, A075227, A010051, A217712. %K A075226 nice,nonn %O A075226 2,1 %A A075226 _T. D. Noe_, Sep 08 2002 %E A075226 More terms from _Martin Fuller_, Jan 19 2008