OFFSET
0,2
COMMENTS
Sum of k such that 2^n+1 <= prime(k) <= 2^(n+1).
EXAMPLE
Row-sums of the sequence of all positive integers as a triangle with row-lengths A036378:
1
2
3 4
5 6
7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
MATHEMATICA
Table[Total[PrimePi/@Select[Range[2^(n-1)+1, 2^n], PrimeQ]], {n, 10}]
PROG
(PARI) ip(n) = primepi(1<<n); \\ A007053
t(n) = n*(n+1)/2; \\ A000217
a(n) = t(ip(n+1)) - t(ip(n)); \\ Michel Marcus, May 31 2024
CROSSREFS
For indices of primes between powers of 2:
- sum A373124 (this sequence)
- length A036378
- max A007053
For primes between powers of 2:
- sum A293697
- length A036378
For squarefree numbers between powers of 2:
- sum A373123
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 31 2024
STATUS
approved