A228776 Positions of even terms of A050376.
1, 3, 9, 63, 6605, 203286826, 425656284238504569
Offset: 1
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = a[n - 1] + PrimePi[2^(2^(n - 1))]; Array[a, 6] (* Amiram Eldar, Dec 04 2018 *)
-
PARI
a(n) = if (n==1, 1, a(n-1) + primepi(2^(2^(n-1)))); \\ Michel Marcus, Dec 04 2018
-
Python
from sympy import primepi def A228776(n): return sum(primepi(1<<(1<Chai Wah Wu, Feb 18 2025
Formula
For n>=2, a(n) = a(n-1) + pi(2^(2^(n-1))), where pi(x) is the prime counting function.
For s>1, Product_{n>=1} (1 + A050376(a(n))^(-s)) = 2^s/(2^s-1).
Extensions
a(6) from Peter J. C. Moses
a(7) from Jinyuan Wang, Mar 03 2020