OFFSET
0,9
COMMENTS
The g.f. for "number of k's" is (1/2)*(x^k/(1+x^k))*(Product_{n>=1} 1 + x^n) + (1/2)*(x^k/(1-x^k))*(Product_{n>=1} 1 - x^n).
Or: the number of partitions of n-1 into an even number of distinct parts >=2. - R. J. Mathar, May 11 2016
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from Andrew Howroyd)
FORMULA
G.f.: (1/2)*(x/(1+x))*(Product_{n>=1} 1 + x^n) + (1/2)*(x/(1-x))*(Product_{n>=1} 1 - x^n).
a(n) ~ exp(Pi*sqrt(n/3)) / (16 * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, May 17 2020
From Peter Bala, Feb 02 2021: (Start)
a(n+1) = d(n) - ( d(n-1) + d(n-3) ) + ( d(n-4) + d(n-6) + d(n-8) ) - ( d(n-9) + d(n-11) + d(n-13) + d(n-15) ) + ( d(n-16) + d(n-18) + d(n-20) + d(n-22) + d(n-24) ) - ( d(n-25) + d(n-27) + d(n-29) + d(n-31) + d(n-33) + d(n-35) ) + ..., where d(n) = A000009(n) is the number of partitions of n into distinct parts, with the convention that d(n) = 0 for n < 0.
G.f.: x/(1 - x^2)*Sum_{n >= 0} (-1)^n*x^((n^2+n+1-(-1)^n)/2)/Product_{k = 1..n} 1 - x^k.
Alternative g.f.: ( Product_{k >= 1} 1 + x^k ) * x*Sum_{n >= 0} (-1)^n*x^(n^2)*(1 - x^(2*n+2))/(1 - x^2).
Faster converging g.f. (conjecture): Sum_{n >= 0} x^((n+1)*(2*n+1))/ Product_{k = 1..2*n} 1 - x^k. (End)
EXAMPLE
a(10) = 3 because the partitions in question are: 7+2+1, 6+3+1, 5+4+1.
MAPLE
A238208 := proc(n)
local a, L, Lset;
a := 0 ;
L := combinat[firstpart](n) ;
while true do
# check that parts are distinct
Lset := convert(L, set) ;
if nops(L) = nops(Lset) then
# check that number is odd
if type(nops(L), 'odd') then
if 1 in Lset then
a := a+1 ;
end if;
end if;
end if;
L := combinat[nextpart](L) ;
if L = FAIL then
return a;
end if;
end do:
a ;
end proc: # R. J. Mathar, May 11 2016
# second Maple program:
b:= proc(n, i, t) option remember; `if`(n=0, t,
`if`(i>n, 0, b(n, i+1, t)+b(n-i, i+1, 1-t)))
end:
a:= n-> b(n-1, 2, 1):
seq(a(n), n=0..100); # Alois P. Heinz, May 01 2020
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, t, If[i > n, 0, b[n, i+1, t] + b[n-i, i+1, 1-t]]];
a[n_] := b[n-1, 2, 1];
a /@ Range[0, 100] (* Jean-François Alcover, May 17 2020, after Alois P. Heinz *)
PROG
(PARI) seq(n)={my(A=O(x^n)); Vec(x*(eta(x^2 + A)/(eta(x + A)*(1+x)) + eta(x + A)/(1-x))/2, -(n+1))} \\ Andrew Howroyd, May 01 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mircea Merca, Feb 20 2014
EXTENSIONS
a(51)-a(60) from R. J. Mathar, May 11 2016
STATUS
approved