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!)
A369781 a(n) = number of nonempty subsets S of {1,2,...,n} such that (number of primes in S) <= (number of nonprimes in S). 4

%I #17 Feb 03 2024 19:51:33

%S 0,1,2,3,10,15,41,63,162,381,847,1485,3301,5811,12910,27823,58650,

%T 109293,230963,430103,910595,1898711,3913703,7507637,15505589,

%U 31746650,64574876,130712028,263644132,520381365,1050777736,2071510458,4187373082,8439258405,16971077851

%N a(n) = number of nonempty subsets S of {1,2,...,n} such that (number of primes in S) <= (number of nonprimes in S).

%H Alois P. Heinz, <a href="/A369781/b369781.txt">Table of n, a(n) for n = 0..2000</a>

%F a(n) + A369780(n) = 2^n-1 = A369853(n) + A369854(n).

%e a(4) = 10 enumerates these subsets: {1}, {4}, {1,2}, {1,3}, {1,4}, {2,4}, {3,4}, {1,3,4}, {1,2,4}, {1,2,3,4}.

%t Map[Length[Select[Map[Commonest, PrimeQ[Rest[Subsets[Range[#]]]]], # != {True} &]] &, Range[22]] (* _Peter J. C. Moses_, Jan 29 2024 *)

%Y Cf. A000040, A018252, A037031, A369781, A369853, A369854.

%K nonn

%O 0,3

%A _Clark Kimberling_, Feb 03 2024

%E a(23)-a(34) from _Alois P. Heinz_, Feb 03 2024

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 August 16 09:29 EDT 2024. Contains 375174 sequences. (Running on oeis4.)