OFFSET
1,2
FORMULA
G.f. A(x) satisfies: A(x) = (x + 2 * (1 + x) * A(x^2)) / (1 - x).
a(n) = 1 + 2 * Sum_{k=2..n} a(floor(k/2)).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = a[n - 1] + 2 a[Floor[n/2]]; Table[a[n], {n, 1, 47}]
nmax = 47; A[_] = 0; Do[A[x_] = (x + 2 (1 + x) A[x^2])/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest
PROG
(Python)
from collections import deque
from itertools import islice
def A347027_gen(): # generator of terms
aqueue, f, b, a = deque([3]), True, 1, 3
yield from (1, 3)
while True:
a += 2*b
yield a
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Aug 11 2021
STATUS
approved