cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348410 Number of nonnegative integer solutions to n = Sum_{i=1..n} (a_i + b_i), with b_i even.

This page as a plain text file.
%I A348410 #48 Jun 11 2024 19:49:23
%S A348410 1,1,5,19,85,376,1715,7890,36693,171820,809380,3830619,18201235,
%T A348410 86770516,414836210,1988138644,9548771157,45948159420,221470766204,
%U A348410 1069091485500,5167705849460,25009724705460,121171296320475,587662804774890,2852708925078675,13859743127937876
%N A348410 Number of nonnegative integer solutions to n = Sum_{i=1..n} (a_i + b_i), with b_i even.
%C A348410 Suppose n objects are to be distributed into 2n baskets, half of these white and half black. White baskets may contain 0 or any number of objects, while black baskets may contain 0 or an even number of objects. a(n) is the number of distinct possible distributions.
%H A348410 Alois P. Heinz, <a href="/A348410/b348410.txt">Table of n, a(n) for n = 0..1441</a>
%F A348410 Conjecture: D-finite with recurrence +7168*n*(2*n-1)*(n-1)*a(n) -64*(n-1)*(1759*n^2-5294*n+5112)*a(n-1) +12*(7561*n^3-75690*n^2+165271*n-101070)*a(n-2) +5*(110593*n^3-743946*n^2+1659971*n-1232778)*a(n-3) +2680*(4*n-15)*(2*n-7)*(4*n-13)*a(n-4)=0. - _R. J. Mathar_, Oct 19 2021
%F A348410 From _Vaclav Kotesovec_, Nov 01 2021: (Start)
%F A348410 Recurrence (of order 2): 16*(n-1)*n*(2*n - 1)*(51*n^2 - 162*n + 127)*a(n) = (n-1)*(5457*n^4 - 22791*n^3 + 32144*n^2 - 17536*n + 3072)*a(n-1) + 8*(2*n - 3)*(4*n - 7)*(4*n - 5)*(51*n^2 - 60*n + 16)*a(n-2).
%F A348410 a(n) ~ sqrt(3 + 5/sqrt(17)) * (107 + 51*sqrt(17))^n / (sqrt(Pi*n) * 2^(6*n+2)). (End)
%F A348410 From _Peter Bala_, Feb 21 2022: (Start)
%F A348410 a(n) = [x^n] ( (1 - x)*(1 - x^2) )^(-n). Cf. A234839.
%F A348410 a(n) = Sum_{k = 0..floor(n/2)} binomial(2*n-2*k-1,n-2*k)*binomial(n+k-1,k).
%F A348410 exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 3*x^2 + 9*x^3 + 32*x^4 + 119*x^5 + ... is the g.f. of A063020.
%F A348410 The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k.
%F A348410 Conjecture: the supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(3*k)) hold for all primes p >= 5 and positive integers n and k.
%F A348410 The o.g.f. A(x) is the diagonal of the bivariate rational function 1/(1 - t/((1-x)*(1-x^2))) and hence is an algebraic function over Q(x) by Stanley 1999, Theorem 6.33, p. 197.
%F A348410 Let F(x) = (1/x)*Series_Reversion( x*(1-x)*(1-x^2) ). Then A(x) = 1 + x*d/dx (log(F(x))). (End)
%F A348410 a(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(2*n+k-1, k)*binomial(2*n-k-1, n-k). Cf. A352373. - _Peter Bala_, Jun 05 2024
%e A348410 Some examples (semicolon separates white basket from black baskets):
%e A348410 For n=1: {{1 ; 0}} - Total possible ways: 1.
%e A348410 For n=2: {{0, 0 ; 0, 2}, {0, 0 ; 2, 0}, {0, 2 ; 0, 0}, {1, 1 ; 0, 0}, {2, 0 ; 0, 0}} - Total possible ways: 5.
%p A348410 b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
%p A348410       add(b(n-j, t-1)*(1+iquo(j, 2)), j=0..n))
%p A348410     end:
%p A348410 a:= n-> b(n$2):
%p A348410 seq(a(n), n=0..25);  # _Alois P. Heinz_, Oct 17 2021
%t A348410 (* giveList=True produces the list of solutions *)
%t A348410 (* giveList=False gives the number of solutions *)
%t A348410 counter[objects_, giveList_: False] :=
%t A348410   Module[{n = objects, nb, eq1, eqa, eqb, eqs, var, sol, var2, list},
%t A348410    nb = n;
%t A348410    eq1 = {Total[Map[a[#] + 2*b[#] &, Range[nb]]] - n == 0};
%t A348410    eqa = {And @@ Map[0 <= a[#] <= n &, Range[nb]]};
%t A348410    eqb = {And @@ Map[0 <= b[#] <= n &, Range[nb]]};
%t A348410    eqs = {And @@ Join[eq1, eqa, eqb]};
%t A348410    var = Flatten[Map[{a[#], b[#]} &, Range[nb]]];
%t A348410    var = Join[Map[a[#] &, Range[nb]], Map[b[#] &, Range[nb]]];
%t A348410    sol = Solve[eqs, var, Integers];
%t A348410    var2 = Join[Map[a[#] &, Range[nb]], Map[2*b[#] &, Range[nb]]];
%t A348410    list = Sort[Map[var2 /. # &, sol]];
%t A348410    list = Map[StringReplace[ToString[#], {"," -> " ;"}, n] &, list];
%t A348410    list = Map[StringReplace[#, {";" -> ","}, n - 1] &, list];
%t A348410    Return[
%t A348410     If[giveList, Print["Total: ", Length[list]]; list, Length[sol]]];
%t A348410    ];
%t A348410 (* second program: *)
%t A348410 b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n], Sum[b[n - j, t - 1]*(1 + Quotient[j, 2]), {j, 0, n}]];
%t A348410 a[n_] := b[n, n];
%t A348410 Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Aug 16 2023, after _Alois P. Heinz_ *)
%Y A348410 Cf. A033715, A033716, A034297, A063020, A088218, A234839, A294860, A348474, A351856, A351857, A352373.
%K A348410 nonn,easy
%O A348410 0,3
%A A348410 _César Eliud Lozada_, Oct 17 2021
%E A348410 More terms from _Alois P. Heinz_, Oct 17 2021