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 A123538 #15 Feb 16 2025 08:33:03 %S A123538 1,2,3,4,5,7,9,10,11,14,15,20,27,35,36,39,48,77,96,99,102,112,131,167, %T A123538 176,201,212,339,356,411,490,546,656,684,839,878,904,920,981,999,1106, %U A123538 1260,1431,1588,2119,2271,2322,2513,2588,2630,3013,3228,3717,3822,3904,4248,6270,6491,7013,7228,7341,7982,8483,9191,9419,10139,10498,12967,13597,13627,13835,15594 %N A123538 Numbers n such that A064168(n) is prime. %C A123538 A001008(n) + A002805(n) = A064168(n) is the sum of numerator and denominator in n-th harmonic number, 1 + 1/2 + 1/3 +...+ 1/n = A001008(n)/A002805(n). Corresponding primes in A064168(n) are listed in A118727(n) = A064168[a(n)] = {2, 5, 17, 37, 197, 503, 9649, 9901, 111431, ...} Primes that are the sum of the numerator and denominator of a harmonic number. %H A123538 Eric Weisstein, The World of Mathematics: <a href="https://mathworld.wolfram.com/HarmonicNumber.html">Harmonic Number</a>. %e A123538 Harmonic numbers begin H(n) = [ 1/1, 3/2, 11/6, 25/12, 137/60, 49/20, 363/140, 761/280, 7129/2520,... ]. %e A123538 A064168(n) begins {2, 5, 17, 37, 197, 69, 503, 1041, 9649, 9901, ...}. %e A123538 Thus a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4, a(5) = 5 because A064168(n) is prime for n = {1, 2, 3, 4, 5}. The next term a(6) = 7 because A064168(7) = 503 is prime but A064168(6) = 69 is composite. %p A123538 N:= 10^4: # to get terms <= N %p A123538 H:= ListTools:-PartialSums([seq(1/i,i=1..N)]): %p A123538 select(t -> isprime(numer(H[t])+denom(H[t])), [$1..N]); # _Robert Israel_, May 30 2019 %t A123538 s=0;Do[s=s+1/n;ss=Numerator[s]+Denominator[s];If[PrimeQ[ss],Print[{n,ss}]],{n,1,1106}] %t A123538 hnpQ[n_]:=With[{hn=HarmonicNumber[n]},PrimeQ[Denominator[hn]+Numerator[hn]]]; Select[Range[4000],hnpQ] (* The program generates the first 55 terms of the sequence. *) (* _Harvey P. Dale_, Nov 27 2024 *) %Y A123538 Cf. A064168, A118727, A001008, A002805, A056903, A067657. %K A123538 nonn %O A123538 1,2 %A A123538 _Alexander Adamchuk_, Nov 11 2006 %E A123538 More terms from _Stefan Steinerberger_, May 13 2007 %E A123538 More terms from _Robert Israel_, May 30 2019