A122258 Number of Pierpont primes <= n.
0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10
Offset: 1
Keywords
Links
- Eric Weisstein's World of Mathematics, Pierpont Prime.
Programs
-
Mathematica
smooth3Q[n_] := Times @@ ({2, 3}^IntegerExponent[n, {2, 3}]) == n; s[n_] := Boole[PrimeQ[n] && smooth3Q[n-1]]; Accumulate[Table[s[n], {n, 1, 100}]] (* Amiram Eldar, May 14 2025 *)
-
PARI
is3smooth(n) = my(m = n >> valuation(n, 2)); m == 3^valuation(m, 3); f(n) = isprime(n) && is3smooth(n-1); list(lim) = {my(s = 0); for(n = 1, lim, s += f(n); print1(s, ", "));} \\ Amiram Eldar, May 14 2025