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.

A348478 Number of compositions of n into exactly n nonnegative parts such that each positive i-th part has the same parity as i.

This page as a plain text file.
%I A348478 #14 Apr 14 2022 07:47:43
%S A348478 1,1,1,4,7,23,55,164,407,1235,3051,9432,23431,72989,182624,571384,
%T A348478 1436855,4511979,11387467,35866100,90782837,286622226,727226578,
%U A348478 2300578392,5848776767,18533394763,47197285045,149769168304,381956145802,1213526310665,3098742448230
%N A348478 Number of compositions of n into exactly n nonnegative parts such that each positive i-th part has the same parity as i.
%H A348478 Alois P. Heinz, <a href="/A348478/b348478.txt">Table of n, a(n) for n = 0..2169</a>
%e A348478 a(0) = 1: [].
%e A348478 a(1) = 1: [1].
%e A348478 a(2) = 1: [0,2].
%e A348478 a(3) = 4: [1,2,0], [0,2,1], [3,0,0], [0,0,3].
%e A348478 a(4) = 7: [1,2,1,0], [1,0,1,2], [3,0,1,0], [1,0,3,0], [0,2,0,2], [0,4,0,0], [0,0,0,4].
%p A348478 b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
%p A348478       add(`if`(j=0 or (t-j)::even, b(n-j, t-1), 0), j=0..n))
%p A348478     end:
%p A348478 a:= n-> b(n$2):
%p A348478 seq(a(n), n=0..33);
%t A348478 b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
%t A348478      Sum[If[j == 0 || EvenQ[t - j], b[n - j, t - 1], 0], {j, 0, n}]];
%t A348478 a[n_] :=  b[n, n];
%t A348478 Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Apr 14 2022, after _Alois P. Heinz_ *)
%Y A348478 Cf. A001700, A062200, A088218, A122514, A165817, A305161, A324969, A348476.
%K A348478 nonn
%O A348478 0,4
%A A348478 _Alois P. Heinz_, Oct 20 2021