OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (A033485(2n+1)-1)/2.
MAPLE
b:= proc(n) option remember;
`if`(n<2, n, b(n-1)+b(iquo(n, 2)))
end:
a:= n-> (b(2*n+1)-1)/2:
seq(a(n), n=1..60); # Alois P. Heinz, Feb 17 2022
PROG
(Python)
from itertools import islice
from collections import deque
def A178855_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
while True:
a += b
aqueue.append(a)
if f:
yield (a-1)//2
b = aqueue.popleft()
f = not f
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Jun 19 2010
EXTENSIONS
a(40) corrected by Georg Fischer, Aug 28 2020
STATUS
approved