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!)
A357215 a(n) = number of nonempty subsets S of {1, 2, ..., n} that contain only primes. 2
0, 1, 3, 3, 7, 7, 15, 15, 15, 15, 31, 31, 63, 63, 63, 63, 127, 127, 255, 255, 255, 255, 511, 511, 511, 511, 511, 511, 1023, 1023, 2047, 2047, 2047, 2047, 2047, 2047, 4095, 4095, 4095, 4095, 8191, 8191, 16383, 16383, 16383, 16383, 32767, 32767, 32767, 32767 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = -1 + A048656(n).
a(n) = 2^A000720(n) - 1.
EXAMPLE
The nonempty subsets S of {1, 2, 3, 4} that contain only primes are these: {2}, {3}, {2,3}, thus, a(4) = 3.
MATHEMATICA
Table[-1 + 2^PrimePi[n], {n, 1, 70}]
PROG
(Python)
from sympy import primepi
def a(n): return 2**primepi(n) - 1
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Sep 24 2022
CROSSREFS
Sequence in context: A263794 A344608 A086530 * A147402 A052551 A147096
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 24 2022
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 April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)