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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A201218 Number of partitions of n such that the number of parts and the largest part and the smallest part are pairwise coprime. 2

%I #11 Oct 07 2014 08:41:46

%S 1,1,1,3,2,5,6,12,13,22,25,40,47,69,85,126,148,204,249,330,404,531,

%T 647,835,1022,1300,1591,2006,2432,3029,3678,4541,5477,6711,8056,9805,

%U 11735,14178,16918,20356,24195,28963,34372,40978,48486,57626,68001,80540,94826

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

%H Alois P. Heinz, <a href="/A201218/b201218.txt">Table of n, a(n) for n = 1..300</a>

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

%e a(5) = 2: [1,1,1,1,1], [1,2,2];

%e a(6) = 5: [1,1,1,1,1,1], [1,1,1,1,2], [1,1,1,3], [1,1,4], [1,5];

%e a(7) = 6: [1,1,1,1,1,1,1], [1,1,1,2,2], [1,1,1,1,3], [1,1,2,3], [1,2,4], [1,1,5];

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

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

%p add(b(n-i, i, t+1, s), i=j..iquo(n, 2))+

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

%p end:

%p a:= n-> `if`(n=1, 1, add(b(n-i, i, 2, i), i=1..iquo(n, 2))):

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

%t b[n_, j_, t_, s_] := b[n, j, t, s] = Sum[b[n-i, i, t+1, s], {i, j, Quotient[n, 2]}] + If[GCD[t, s] == 1 && GCD[t, n] == 1 && GCD[n, s] == 1, 1, 0]; a[n_] := If[n == 1, 1, Sum [b[n-i, i, 2, i], {i, 1, Quotient[n, 2]}]]; Table[a[n], {n, 1, 60}] (* _Jean-François Alcover_, Oct 07 2014, translated from Maple *)

%Y Cf. A199890.

%K nonn

%O 1,4

%A _Alois P. Heinz_, Nov 28 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.

Last modified March 1 17:48 EST 2024. Contains 370442 sequences. (Running on oeis4.)