login
A347027
a(1) = 1; a(n) = a(n-1) + 2 * a(floor(n/2)).
1
1, 3, 5, 11, 17, 27, 37, 59, 81, 115, 149, 203, 257, 331, 405, 523, 641, 803, 965, 1195, 1425, 1723, 2021, 2427, 2833, 3347, 3861, 4523, 5185, 5995, 6805, 7851, 8897, 10179, 11461, 13067, 14673, 16603, 18533, 20923, 23313, 26163, 29013, 32459, 35905, 39947, 43989
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
A347027_list = list(islice(A347027_gen(), 40)) # Chai Wah Wu, Jun 08 2022
CROSSREFS
Partial sums of A039722.
Sequence in context: A049752 A371165 A286264 * A147350 A066692 A123533
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Aug 11 2021
STATUS
approved