A102378 a(n) = a(n-1) + a([n/2]) + 1, a(1) = 1.
1, 3, 5, 9, 13, 19, 25, 35, 45, 59, 73, 93, 113, 139, 165, 201, 237, 283, 329, 389, 449, 523, 597, 691, 785, 899, 1013, 1153, 1293, 1459, 1625, 1827, 2029, 2267, 2505, 2789, 3073, 3403, 3733, 4123, 4513, 4963, 5413, 5937, 6461, 7059, 7657, 8349
Offset: 1
Keywords
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],And[Max@@#>1,And@@IntegerQ/@Log[2,#]]&]],{n,0,30,2}] (* Gus Wiseman, Mar 23 2019 *)
-
Python
from itertools import islice from collections import deque def A102378_gen(): # generator of terms aqueue, f, b, a = deque([2]), True, 1, 2 yield from (1, 3) while True: a += b yield 2*a - 1 aqueue.append(a) if f: b = aqueue.popleft() f = not f A102378_list = list(islice(A102378_gen(),40)) # Chai Wah Wu, Jun 08 2022
Formula
a(n) - a(n-1) = A018819(n+1)
G.f. A(x) satisfies (1-x)*A(x) = 2(1 + x)*B(x^2), where B(x) is the gf of A033485
a(n) = A000123(n) - 1. - Gus Wiseman, Mar 23 2019
G.f. A(x) satisfies: A(x) = (x + (1 - x^2) * A(x^2)) / (1 - x)^2. - Ilya Gutkovskiy, Aug 11 2021
Comments