OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..286
David J. Hemmer and Karlee J. Westrem, Palindrome Partitions and the Calkin-Wilf Tree, arXiv:2402.02250 [math.CO], 2024. See Table 5.1 p. 9.
FORMULA
a(n) = 2 if and only if n = 3 or n + 1 > 2 is prime (Hemmer and Westrem).
For proofs of the following, see A368548.
Let T(n,k) be the table in A183917.
Let x = 0 if n is even and x = Sum_{d|(n+1)/2} T((n+1)/d-2,d-1) if n is odd.
Let y = 2*Sum_{d|n+1, d>=3, and d is odd} T(d-2,(n+1)/d-1).
Then a(n) = x+y.
If n>3 is odd and (n+1)/2 is prime, then a(n) = A368548(n) = (n+3)/2.
a(2^n-1) = Sum_{i=0..n-1} T(2^(n-i)-2,2^i-1).
PROG
(Python)
from sympy import divisors
from sympy.utilities.iterables import partitions
def A375783(n):
def A183917_T(n, k): return sum(1 for p in partitions(k*n, m=n, k=k<<1))
x = sum(A183917_T((n+1)//d-2, d-1) for d in divisors(n+1>>1, generator=True)) if n&1 else 0
y = sum(A183917_T(d-2, (n+1)//d-1) for d in divisors((n+1)>>(~(n+1)&n).bit_length(), generator=True) if d>=3)<<1
return x+y
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Aug 28 2024
STATUS
approved