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!)
A037031 Number of combinations of n objects taken pi(n) at a time. 7

%I #24 Oct 14 2022 16:05:01

%S 1,1,2,3,6,10,20,35,70,126,210,462,792,1716,3003,5005,8008,19448,

%T 31824,75582,125970,203490,319770,817190,1307504,2042975,3124550,

%U 4686825,6906900,20030010,30045015,84672315,129024480,193536720,286097760,417225900,600805296

%N Number of combinations of n objects taken pi(n) at a time.

%C Number of subsets of [n] in which exactly half of the elements are primes: a(6) = 20: {}, {1,2}, {1,3}, {1,5}, {2,4}, {2,6}, {3,4}, {3,6}, {4,5}, {5,6}, {1,2,3,4}, {1,2,3,6}, {1,2,4,5}, {1,2,5,6}, {1,3,4,5}, {1,3,5,6}, {2,3,4,6}, {2,4,5,6}, {3,4,5,6}, {1,2,3,4,5,6}. - _Alois P. Heinz_, Oct 11 2022

%H Alois P. Heinz, <a href="/A037031/b037031.txt">Table of n, a(n) for n = 0..2000</a> (terms n = 1..1000 from Vincenzo Librandi)

%F a(n) = C(n,pi(n)).

%e C(16,6) = 8008.

%p with(numtheory); A037031:=n->binomial(n, pi(n)); seq(A037031(k), k=0..100); # _Wesley Ivan Hurt_, Oct 19 2013

%t Table[Binomial[n,PrimePi[n]],{n,40}] (* _Harvey P. Dale_, Mar 22 2012 *)

%o (Python)

%o from math import comb

%o from sympy import primepi

%o def A037031(n): return comb(n,primepi(n)) # _Chai Wah Wu_, Oct 14 2022

%Y Cf. A000040, A000720.

%K nonn

%O 0,3

%A _G. L. Honaker, Jr._

%E a(0)=1 prepended by _Alois P. Heinz_, Oct 11 2022

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 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)