OFFSET
1,2
FORMULA
EXAMPLE
The numbers prime(a(n)) together with their binary expansions and binary indices begin:
2: 10 ~ {2}
5: 101 ~ {1,3}
11: 1011 ~ {1,2,4}
17: 10001 ~ {1,5}
37: 100101 ~ {1,3,6}
67: 1000011 ~ {1,2,7}
131: 10000011 ~ {1,2,8}
257: 100000001 ~ {1,9}
521: 1000001001 ~ {1,4,10}
1031: 10000000111 ~ {1,2,3,11}
2053: 100000000101 ~ {1,3,12}
4099: 1000000000011 ~ {1,2,13}
8209: 10000000010001 ~ {1,5,14}
16411: 100000000011011 ~ {1,2,4,5,15}
32771: 1000000000000011 ~ {1,2,16}
65537: 10000000000000001 ~ {1,17}
131101: 100000000000011101 ~ {1,3,4,5,18}
262147: 1000000000000000011 ~ {1,2,19}
524309: 10000000000000010101 ~ {1,3,5,20}
1048583: 100000000000000000111 ~ {1,2,3,21}
2097169: 1000000000000000010001 ~ {1,5,22}
4194319: 10000000000000000001111 ~ {1,2,3,4,23}
8388617: 100000000000000000001001 ~ {1,4,24}
MATHEMATICA
Table[PrimePi[If[n==1, 2, NextPrime[2^n]]], {n, 30}]
PROG
(PARI) a(n) = primepi(nextprime(2^n)); \\ Michel Marcus, May 31 2024
CROSSREFS
The opposite (greatest k such that prime(k) <= 2^n) is A007053.
Positions of first appearances in A035100.
The distance from prime(a(n)) to 2^n is A092131.
For primes between powers of 2:
- sum A293697
- length A036378
For squarefree numbers between powers of 2:
- sum A373123
For squarefree numbers between primes:
- sum A373197
- min A000040
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 30 2024
EXTENSIONS
More terms from Michel Marcus, May 31 2024
STATUS
approved