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.
%I A089820 #14 Sep 08 2022 08:45:12 %S A089820 0,2,6,12,28,56,120,240,480,960,1984,3968,8064,16128,32256,64512, %T A089820 130048,260096,522240,1044480,2088960,4177920,8372224,16744448, %U A089820 33488896,66977792,133955584,267911168,536346624,1072693248,2146435072,4292870144,8585740288 %N A089820 Number of subsets of {1,..,n} containing at least one prime. %C A089820 a(n) = Sum(A089818(n,k): 1<=k<=A000720(n)) = A000079(n)-A089819(n) = A089819(n)*A000225(A000720(n)). %H A089820 Vincenzo Librandi, <a href="/A089820/b089820.txt">Table of n, a(n) for n = 1..1000</a> %F A089820 a(n) = 2^n - 2^(n-pi(n)) = the total number of subsets minus the number of subsets of the nonprime elements of {1,..,n}, where pi = A000720. - _Greg Martin_, May 13 2004 %p A089820 with(numtheory): A089820:=n->2^n - 2^(n-pi(n)): seq(A089820(n), n=1..30); # _Wesley Ivan Hurt_, Sep 19 2014 %t A089820 Table[2^n - 2^(n - PrimePi[n]), {n, 30}] (* _Wesley Ivan Hurt_, Sep 19 2014 *) %o A089820 (Magma) [2^n-2^(n-#PrimesUpTo(n)) : n in [1..30]]; // _Wesley Ivan Hurt_, Sep 19 2014 %Y A089820 Cf. A089822. %Y A089820 Cf. A000079, A000225, A000720, A089818, A089819. %K A089820 nonn,easy %O A089820 1,2 %A A089820 _Reinhard Zumkeller_, Nov 12 2003 %E A089820 More terms from _Wesley Ivan Hurt_, Sep 19 2014