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.

A348017 Numbers k such that the numerator of the fractional part of the k-th harmonic is a prime number.

This page as a plain text file.
%I A348017 #11 Sep 28 2021 04:06:51
%S A348017 3,5,7,9,10,12,19,21,24,29,34,39,45,46,54,65,84,86,116,128,161,177,
%T A348017 248,254,274,297,349,352,412,422,475,493,636,747,793,811,855,864,1012,
%U A348017 1060,1074,1097,1127,1139,1152,1299,1371,1423,1785,1847,1872,1873,2072,2326
%N A348017 Numbers k such that the numerator of the fractional part of the k-th harmonic is a prime number.
%C A348017 The corresponding primes are 5, 17, 83, 2089, 2341, 2861, 42503239, 3338549, 276977179, 2239777822987, ...
%H A348017 Amiram Eldar, <a href="/A348017/b348017.txt">Table of n, a(n) for n = 1..96</a>
%e A348017 3 is a term since 1 + 1/2 + 1/3 = 11/6, the fractional part of 11/6 is 5/6 and its numerator, 5, is prime.
%e A348017 5 is a term since 1 + 1/2 + 1/3 + 1/4 + 1/5 = 137/60, the fractional part of 137/60 is 17/60 and its numerator, 17, is prime.
%t A348017 s = 0; seq = {}; Do[s += 1/n; If[PrimeQ @ Numerator @ FractionalPart[s], AppendTo[seq, n]], {n, 1, 2500}]; seq
%o A348017 (Python)
%o A348017 from sympy import harmonic, isprime
%o A348017 A348017_list = [k for k in range(10**3) if isprime((lambda x: x.p % x.q)(harmonic(k)))] # _Chai Wah Wu_, Sep 26 2021
%Y A348017 Cf. A056903, A104174.
%K A348017 nonn
%O A348017 1,1
%A A348017 _Amiram Eldar_, Sep 24 2021