OFFSET
1,1
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..49
EXAMPLE
The primes and the groups of them summed begin
primes 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, ...
\/ \/ \--/ \--------/ \----------------/
F(n) = 1, 1, 2, 3, 5, group length
a(n) = 2, 3, 12, 41, 139, group sum
a(1) = 2 because the first f(1)=1 prime is 2.
a(2) = 3 because the next f(2)=1 prime is 3.
a(3) = 12 because the next f(2)=2 primes are 5 and 7 which add up to 12.
a(4) = 41 because the next f(3)=3 primes are 11, 13 and 17, and they add up to 41.
MATHEMATICA
With[{m = 30}, Plus @@@ TakeList[Prime[Range[Fibonacci[m + 2] - 1]], Fibonacci[Range[m]]]] (* Amiram Eldar, May 25 2024 *)
PROG
(PARI) a371877(nterms) = {my (n1=0, n2=1, p=1); for (n=1, nterms, n1=n2; n2=n1+fibonacci(n); my(s=0); for(k=n1, n2-1, s+=p=nextprime(p+1)); print1 (s, ", "))};
a371877(30) \\ Hugo Pfoertner, May 25 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Harish Chalwadi, May 24 2024
EXTENSIONS
a(11)-a(23) from Michel Marcus, May 25 2024
a(24)-a(30) from Hugo Pfoertner, May 25 2024
STATUS
approved