OFFSET
1,1
COMMENTS
a(n) = 2 for n = {1,2,4,8,16,...}. Corresponding Fermat primes A019434.
a(n) = 3 for n = {3,9,13,25,27,29,95,107,153,159,...}.
a(n) = 5 for n = {10,15,60,90,197,209,...}.
a(n) = 7 for n = {18,47,112,155,273,...}.
a(n) = 15 for n = {7,30,43,...}.
a(21) = 26. a(28) = 4. a(31) = 56. a(144) = 9.
From Alexander Adamchuk, Apr 18 2010: (Start)
a(22)-a(25) = {1298,115,139,3}.
a(27)-a(32) = {3,4,3,15,56,177}.
a(n) = 3 for all n>2 listed in A125706. (End)
a(26) = 2019. - Alexander Adamchuk, Apr 26 2010
a(20) > 3000. - Michael S. Branicky, Jun 25 2022
LINKS
Eric Weisstein's World of Mathematics, Harmonic Number
MATHEMATICA
Do[n = 1; f = 0; While[Not[PrimeQ[Numerator[f]]], f = f + 1/n^x; n++ ]; Print[{x, n - 1}], {x, 1, 25}] (* Alexander Adamchuk, Apr 18 2010 *)
PROG
(PARI) a(n) = my(k=1); while (!ispseudoprime(numerator(sum(i=1, k, 1/i^n))), k++); k; \\ Michel Marcus, Jun 04 2022
(Python)
from sympy import isprime
from fractions import Fraction
def a(n):
Hkn, k = Fraction(1, 1), 1
while not isprime(Hkn.numerator):
k += 1
Hkn += Fraction(1, k**n)
return k
print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Jun 11 2022
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Alexander Adamchuk, Dec 28 2006, Jan 31 2007
EXTENSIONS
a(22)-a(25) from Alexander Adamchuk, Apr 18 2010
a(26)-a(32) from Alexander Adamchuk, Apr 26 2010
Incorrect a(20) removed by Michael S. Branicky, Jun 25 2022
a(20) = 8902 from Michael S. Branicky, Jun 12 2023
STATUS
approved