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.

A199887 Number of compositions of n such that the number of parts and the greatest part are not coprime.

This page as a plain text file.
%I A199887 #15 Nov 16 2014 14:59:38
%S A199887 0,0,2,1,9,14,24,43,108,227,440,817,1580,3123,6209,12462,25536,52744,
%T A199887 107911,216702,427673,835023,1627607,3195179,6352470,12792446,
%U A199887 25977145,52859412,107195861,215970512,432053205,859546186,1705026253,3381411667,6718113104
%N A199887 Number of compositions of n such that the number of parts and the greatest part are not coprime.
%H A199887 Alois P. Heinz, <a href="/A199887/b199887.txt">Table of n, a(n) for n = 1..250</a>
%F A199887 a(n) = A000079(n-1) - A199886(n).
%e A199887 a(5) = 9: [1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,3,1], [1,4], [2,1,1,1], [3,1,1], [4,1].
%p A199887 b:= proc(n, t, g) option remember;
%p A199887       `if`(n=0, `if`(igcd(g, t)<>1, 1, 0),
%p A199887        add(b(n-i, t+1, max(i, g)), i=1..n))
%p A199887     end:
%p A199887 a:= n-> b(n, 0, 0):
%p A199887 seq(a(n), n=1..40);
%t A199887 b[n_, t_, g_] :=  b[n, t, g] = If[n == 0, If[GCD[g, t] != 1, 1, 0], Sum[b[n-i, t+1, Max[i, g]], {i, 1, n}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 1, 40}] (* _Jean-François Alcover_, Nov 05 2014, after _Alois P. Heinz_ *)
%Y A199887 Cf. A000079, A199886, A200792.
%K A199887 nonn
%O A199887 1,3
%A A199887 _Alois P. Heinz_, Nov 11 2011