OFFSET
1,2
COMMENTS
This sequence is a variant of A350877; here we add terms of the sequence, there prime numbers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1.
a(2) = a(1) + a(1) = 2 as a(1) is the 1st odd term.
a(3) = a(2) / 2 = 1 as a(2) is even.
a(4) = a(3) + a(2) = 3 as a(3) is the 2nd odd term.
a(5) = a(4) + a(3) = 4 as a(4) is the 3rd odd term.
PROG
(PARI) k=0; for (n=1, #a=vector(75), print1 (a[n]=if (n==1, 1, a[n-1]%2==0, a[n-1]/2, a[n-1]+a[k++])", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 23 2022
STATUS
approved