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!)
A369853 a(n) = number of subsets S of {1,2,...,n} such that (number of nonprimes in S) < (number of primes in S). 4
0, 1, 1, 1, 5, 6, 22, 29, 93, 256, 638, 1024, 2510, 4096, 9908, 22819, 50643, 89846, 199140, 354522, 784626, 1695222, 3593934, 6690448, 14198086, 29703676, 61450327, 126025204, 256737233, 500351356, 1020732722, 1986838144, 4058348603, 8245721686, 16684980092 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) = A369781(n) - A369854(n).
EXAMPLE
a(4) = 5 enumerates these subsets: {1}, {4}, {1,4}, {1,2,4}, {1,3,4}.
MAPLE
b:= proc(n, t) option remember; `if`(n=0, `if`(t<0, 1, 0),
b(n-1, t)+b(n-1, t+`if`(isprime(n), 1, -1)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..34); # Alois P. Heinz, Feb 03 2024
MATHEMATICA
Map[Length[Select[Map[Commonest, PrimeQ[Rest[Subsets[Range[#]]]]], # == {False, True} || # == {True, False} &]] &, Range[22]] (* Peter J. C. Moses, Jan 29 2024 *)
CROSSREFS
Sequence in context: A224915 A135301 A294175 * A370337 A192917 A030672
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 03 2024
EXTENSIONS
a(23)-a(34) from Alois P. Heinz, Feb 03 2024
STATUS
approved

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 May 10 15:26 EDT 2024. Contains 372387 sequences. (Running on oeis4.)