login
Smallest number m such that Sum_{k=1..m} 1/prime(k) >= n/2.
10

%I #17 Mar 27 2019 19:07:32

%S 1,3,10,59,1413,361139,4833601540,43922730588128390

%N Smallest number m such that Sum_{k=1..m} 1/prime(k) >= n/2.

%F a(2n) = A046024(n). - _Michel Marcus_, Aug 22 2013

%t Table[m = 1; s = 0; While[(s = s + 1/Prime[m]) < n/2, m++];

%t m, {n, 1, 5}] (* _Robert Price_, Mar 27 2019 *)

%o (PARI) a(n) = my(s = 0, k = 1); while ((s += 1/prime(k)) < n/2, k++); k \\ _Michel Marcus_, Aug 22 2013

%Y Cf. A016088, A046024, A103592-A103600.

%K nonn,more

%O 1,2

%A _James R. Buddenhagen_, Mar 28 2005

%E a(7) from _Robert Price_, Dec 10 2013

%E a(8) derived from A046024 by _Robert Price_, Dec 10 2013