A383891 a(n) is the length of chunks of the prime number sequence such that each chunk’s sum of reciprocals is no less than 1/n, chunks being consecutive and of minimal length, for n>=2.
1, 1, 2, 3, 5, 8, 13, 22, 36, 60, 100, 168, 284, 482, 819, 1397, 2389, 4096, 7044, 12137, 20956, 36259
Offset: 2
Examples
1/2 <= 1/2, so a(2) = 1. 1/3 <= 1/3, so a(3) = 1. 1/4 <= 1/5 + 1/7, so a(4) = 2. 1/5 <= 1/11 + 1/13 + 1/17, so a(5) = 3. 1/6 <= 1/19 + 1/23 + 1/29 + 1/31 + 1/37, so a(6) = 5.
Crossrefs
Cf. A000040.
Programs
-
Haskell
import Data.Numbers.Primes (primes) import Data.Ratio ((%)) list = map length (splitBySum (reciprocals [2 ..]) (reciprocals primes)) reciprocals = map (1 %) splitBySum (x : xs) a = a1 : splitBySum xs a2 where (a1, a2) = splitAt (len + 1) a len = length (takeWhile (< x) (scanl1 (+) a))
Comments