cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A369853 a(n) = number of subsets of {1,2,...,n} that contain more nonprimes than primes.

This page as a plain text file.
%I A369853 #18 Jul 27 2025 10:54:15
%S A369853 0,1,1,1,5,6,22,29,93,256,638,1024,2510,4096,9908,22819,50643,89846,
%T A369853 199140,354522,784626,1695222,3593934,6690448,14198086,29703676,
%U A369853 61450327,126025204,256737233,500351356,1020732722,1986838144,4058348603,8245721686,16684980092
%N A369853 a(n) = number of subsets of {1,2,...,n} that contain more nonprimes than primes.
%H A369853 Alois P. Heinz, <a href="/A369853/b369853.txt">Table of n, a(n) for n = 0..2000</a>
%F A369853 a(n) = A369781(n) - A369854(n).
%e A369853 a(4) = 5 enumerates these subsets: {1}, {4}, {1,4}, {1,2,4}, {1,3,4}.
%p A369853 b:= proc(n, t) option remember; `if`(n=0, `if`(t<0, 1, 0),
%p A369853       b(n-1, t)+b(n-1, t+`if`(isprime(n), 1, -1)))
%p A369853     end:
%p A369853 a:= n-> b(n, 0):
%p A369853 seq(a(n), n=0..34);  # _Alois P. Heinz_, Feb 03 2024
%t A369853 Map[Length[Select[Map[Commonest, PrimeQ[Rest[Subsets[Range[#]]]]], # == {False, True} || # == {True, False} &]] &, Range[22]]   (* _Peter J. C. Moses_, Jan 29 2024 *)
%Y A369853 Cf. A000040, A018252, A369780, A369781, A369854.
%K A369853 nonn
%O A369853 0,5
%A A369853 _Clark Kimberling_, Feb 03 2024
%E A369853 a(23)-a(34) from _Alois P. Heinz_, Feb 03 2024