login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199888 Number of compositions of n such that the number of parts and the smallest part are coprime. 3

%I #13 Nov 16 2014 15:01:18

%S 1,2,4,7,14,30,62,124,247,495,994,1999,4020,8076,16204,32482,65076,

%T 130326,260927,522298,1045325,2091849,4185665,8374551,16754372,

%U 33517355,67048754,134120372,268277888,536615992,1073329437,2146816436,4293887542,8588186785

%N Number of compositions of n such that the number of parts and the smallest part are coprime.

%H Alois P. Heinz, <a href="/A199888/b199888.txt">Table of n, a(n) for n = 1..500</a>

%F a(n) = A000079(n-1) - A199889(n).

%e a(4) = 7: [1,1,1,1], [1,1,2], [1,2,1], [1,3], [2,1,1], [3,1], [4].

%p b:= proc(n, t, g) option remember;

%p `if`(n=0, `if`(igcd(g, t)=1, 1, 0),

%p add(b(n-i, t+1, min(i, g)), i=1..n))

%p end:

%p a:= n-> b(n, 0, infinity):

%p seq(a(n), n=1..40);

%t b[n_, t_, g_] := b[n, t, g] = If[n == 0, If[GCD[g, t] == 1, 1, 0], Sum[b[n-i, t+1, Min[i, g]], {i, 1, n}]]; a[n_] := b[n, 0, Infinity]; Table[a[n], {n, 1, 40}] (* _Jean-François Alcover_, Nov 05 2014, after _Alois P. Heinz_ *)

%Y Cf. A000079, A199889, A200928.

%K nonn

%O 1,2

%A _Alois P. Heinz_, Nov 11 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)