OFFSET
1,2
COMMENTS
From Gus Wiseman, Mar 23 2019: (Start)
The offset could safely be changed to zero by setting the boundary condition to a(0) = 0.
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:
(2) (4) (42) (8) (82)
(22) (222) (44) (442)
(211) (411) (422) (811)
(2211) (2222) (4222)
(21111) (4211) (4411)
(22211) (22222)
(41111) (42211)
(221111) (222211)
(2111111) (421111)
(2221111)
(4111111)
(22111111)
(211111111)
(End)
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
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], And[Max@@#>1, And@@IntegerQ/@Log[2, #]]&]], {n, 0, 30, 2}] (* Gus Wiseman, Mar 23 2019 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Mitch Harris, Jan 05 2005
STATUS
approved