login
a(n) = a(n-1) + a([n/2]) + 1, a(1) = 1.
10

%I #15 Jun 09 2022 02:29:33

%S 1,3,5,9,13,19,25,35,45,59,73,93,113,139,165,201,237,283,329,389,449,

%T 523,597,691,785,899,1013,1153,1293,1459,1625,1827,2029,2267,2505,

%U 2789,3073,3403,3733,4123,4513,4963,5413,5937,6461,7059,7657,8349

%N a(n) = a(n-1) + a([n/2]) + 1, a(1) = 1.

%C From _Gus Wiseman_, Mar 23 2019: (Start)

%C The offset could safely be changed to zero by setting the boundary condition to a(0) = 0.

%C Also the number of integer partitions of 2n into powers of 2 with at least one part > 1. The Heinz numbers of these partitions are given by A324927. For example, the a(1) = 1 through a(5) = 13 integer partitions are:

%C (2) (4) (42) (8) (82)

%C (22) (222) (44) (442)

%C (211) (411) (422) (811)

%C (2211) (2222) (4222)

%C (21111) (4211) (4411)

%C (22211) (22222)

%C (41111) (42211)

%C (221111) (222211)

%C (2111111) (421111)

%C (2221111)

%C (4111111)

%C (22111111)

%C (211111111)

%C (End)

%F a(n) - a(n-1) = A018819(n+1)

%F G.f. A(x) satisfies (1-x)*A(x) = 2(1 + x)*B(x^2), where B(x) is the gf of A033485

%F a(n) = A000123(n) - 1. - _Gus Wiseman_, Mar 23 2019

%F G.f. A(x) satisfies: A(x) = (x + (1 - x^2) * A(x^2)) / (1 - x)^2. - _Ilya Gutkovskiy_, Aug 11 2021

%t Table[Length[Select[IntegerPartitions[n],And[Max@@#>1,And@@IntegerQ/@Log[2,#]]&]],{n,0,30,2}] (* _Gus Wiseman_, Mar 23 2019 *)

%o (Python)

%o from itertools import islice

%o from collections import deque

%o def A102378_gen(): # generator of terms

%o aqueue, f, b, a = deque([2]), True, 1, 2

%o yield from (1, 3)

%o while True:

%o a += b

%o yield 2*a - 1

%o aqueue.append(a)

%o if f: b = aqueue.popleft()

%o f = not f

%o A102378_list = list(islice(A102378_gen(),40)) # _Chai Wah Wu_, Jun 08 2022

%Y Cf. A000123, A033485.

%Y Cf. A018819, A318400, A324927, A324928.

%K nonn

%O 1,2

%A _Mitch Harris_, Jan 05 2005