OFFSET
0,6
COMMENTS
Also the number of strict integer partitions of n containing two possibly equal elements summing to n.
FORMULA
a(n) = (n-1)/2 if n is odd. a(n) = n/2 + A000009(n/2) - 2 if n is even and n > 0. - Chai Wah Wu, Sep 18 2023
EXAMPLE
The a(3) = 1 through a(11) = 5 partitions:
(2,1) (3,1) (3,2) (4,2) (4,3) (5,3) (5,4) (6,4) (6,5)
(4,1) (5,1) (5,2) (6,2) (6,3) (7,3) (7,4)
(3,2,1) (6,1) (7,1) (7,2) (8,2) (8,3)
(4,3,1) (8,1) (9,1) (9,2)
(5,3,2) (10,1)
(5,4,1)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&(Length[#]==2||Max@@#==n/2)&]], {n, 0, 30}]
PROG
(Python)
from sympy.utilities.iterables import partitions
def A365659(n): return n>>1 if n&1 or n==0 else (m:=n>>1)+sum(1 for p in partitions(m) if max(p.values(), default=1)==1)-2 # Chai Wah Wu, Sep 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 16 2023
STATUS
approved