editing
proposed
editing
proposed
Conjectures from Chai Wah Wu, Nov 15 2024: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) - a(n-6) + a(n-7) + a(n-9) - a(n-10) for n > 10.
G.f.: (x^10 + 5*x^9 + 6*x^8 + 4*x^7 - x^5 + 4*x^3 + 6*x^2 + 5*x + 1)/(x^10 - x^9 - x^7 + x^6 + x^4 - x^3 - x + 1). (End)
approved
editing
editing
proposed
editing
proposed
return comb(a-(b+1>>1), b+1>>1) if b&1 else 0 # Chai Wah Wu, Nov 14 2024
(Python)
from math import isqrt, comb
def A374441(n):
a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
b = n-comb(a+1, 2)
return comb(a-(b+1>>1), b+1>>1) if b&1 else 0 # Chai Wah Wu, Nov 14 2024
approved
editing
editing
proposed
return int(binomial(c:=a-1<<1, d:=a-b-1)-binomial(c, d-1)+binomial(a-2, d+1)) if n else 0 # Chai Wah Wu, Nov 14 2024
(Python)
from math import isqrt
from sympy import binomial
def A375854(n):
a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
b = n-binomial(a+1, 2)
return int(binomial(c:=a-1<<1, d:=a-b-1)-binomial(c, d-1)+binomial(a-2, d+1)) if n else 0 # Chai Wah Wu, Nov 14 2024
approved
editing