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.

A224958 Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) != p(j-2).

This page as a plain text file.
%I A224958 #19 Jun 02 2025 08:31:20
%S A224958 1,1,2,3,6,9,18,29,53,91,162,277,495,855,1508,2625,4618,8049,14130,
%T A224958 24675,43255,75621,132475,231697,405751,709887,1242824,2174763,
%U A224958 3806989,6662291,11661737,20409409,35723307,62521919,109431810,191527623,335225350,586717615
%N A224958 Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) != p(j-2).
%H A224958 Alois P. Heinz, <a href="/A224958/b224958.txt">Table of n, a(n) for n = 0..500</a>
%F A224958 a(n) ~ c * d^n, where d = 1.7502412917183090312497386246... (see A241902) and c = 0.5940298439978189763822100914... - _Vaclav Kotesovec_, May 01 2014
%e A224958 The a(6) = 18 such compositions of 6 are
%e A224958 01:  [ 1 1 2 2 ]
%e A224958 02:  [ 1 1 4 ]
%e A224958 03:  [ 1 2 2 1 ]
%e A224958 04:  [ 1 2 3 ]
%e A224958 05:  [ 1 3 2 ]
%e A224958 06:  [ 1 5 ]
%e A224958 07:  [ 2 1 1 2 ]
%e A224958 08:  [ 2 1 3 ]
%e A224958 09:  [ 2 2 1 1 ]
%e A224958 10:  [ 2 3 1 ]
%e A224958 11:  [ 2 4 ]
%e A224958 12:  [ 3 1 2 ]
%e A224958 13:  [ 3 2 1 ]
%e A224958 14:  [ 3 3 ]
%e A224958 15:  [ 4 1 1 ]
%e A224958 16:  [ 4 2 ]
%e A224958 17:  [ 5 1 ]
%e A224958 18:  [ 6 ]
%p A224958 b:= proc(n, i, j) option remember; `if`(n=0, 1, add(`if`(k=j, 0,
%p A224958       b(n-k, `if`(n-k<k, 0, k), `if`(n-k<i, 0, i))), k=1..n))
%p A224958     end:
%p A224958 a:= n-> b(n, 0, 0):
%p A224958 seq(a(n), n=0..50);  # _Alois P. Heinz_, May 02 2013
%t A224958 b[n_, i_, j_] := b[n, i, j] = If[n==0, 1, Sum[If[k==j, 0, b[n-k, If[n-k < k, 0, k], If[n-k < i, 0, i]]], {k, 1, n}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Apr 08 2015, after _Alois P. Heinz_ *)
%Y A224958 Cf. A000726 (partitions such that p(j) != p(j-2)), A003242, A241902.
%K A224958 nonn
%O A224958 0,3
%A A224958 _Joerg Arndt_, Apr 21 2013