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.

A123538 Numbers n such that A064168(n) is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 10, 11, 14, 15, 20, 27, 35, 36, 39, 48, 77, 96, 99, 102, 112, 131, 167, 176, 201, 212, 339, 356, 411, 490, 546, 656, 684, 839, 878, 904, 920, 981, 999, 1106, 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
Offset: 1

Views

Author

Alexander Adamchuk, Nov 11 2006

Keywords

Comments

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.

Examples

			Harmonic numbers begin H(n) = [ 1/1, 3/2, 11/6, 25/12, 137/60, 49/20, 363/140, 761/280, 7129/2520,... ].
A064168(n) begins {2, 5, 17, 37, 197, 69, 503, 1041, 9649, 9901, ...}.
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.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # to get terms <= N
    H:= ListTools:-PartialSums([seq(1/i,i=1..N)]):
    select(t -> isprime(numer(H[t])+denom(H[t])), [$1..N]); # Robert Israel, May 30 2019
  • Mathematica
    s=0;Do[s=s+1/n;ss=Numerator[s]+Denominator[s];If[PrimeQ[ss],Print[{n,ss}]],{n,1,1106}]
    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 *)

Extensions

More terms from Stefan Steinerberger, May 13 2007
More terms from Robert Israel, May 30 2019