login
A357214
a(n) = number of subsets S of {1, 2, ..., n} such that every number in S is a composite.
2
1, 1, 1, 2, 2, 4, 4, 8, 16, 32, 32, 64, 64, 128, 256, 512, 512, 1024, 1024, 2048, 4096, 8192, 8192, 16384, 32768, 65536, 131072, 262144, 262144, 524288, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 16777216, 33554432, 67108864, 134217728, 134217728
OFFSET
1,4
FORMULA
a(n) = (1/2)*(2^(n - A000720(n))).
a(n) = 2^A065855(n).
EXAMPLE
The subsets S of {1,2,3,4,5,6} such that every number in S is a composite are {}, {4}, {6}, and {4,6}, so a(6) = 4.
MATHEMATICA
(1/2) Table[2^(n - PrimePi[n]), {n, 50}]
PROG
(Python)
from sympy import primepi
def a(n): return 2**(n-primepi(n)-1)
print([a(n) for n in range(1, 42)]) # Michael S. Branicky, Sep 24 2022
(PARI) a(n) = 1 << (n-primepi(n)-1); \\ Kevin Ryde, Sep 24 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 24 2022
STATUS
approved