A060377 Pepin's test numbers.
3, 9, 6561, 11790184577738583171520872861412518665678211592275841109096961
Offset: 0
Keywords
Examples
a(1) = 3^((F(1)-1)/2) = 3^((5-1)/2) = 3^2 = 9.
Links
- C. K. Caldwell, Pepin's Test.
Crossrefs
Cf. A000215.
Programs
-
Mathematica
A000215[n_]:=2^(2^n)+1; a[n_]:=3^((A000215[n]-1)/2); Array[a,4,0] (* Stefano Spezia, Sep 14 2024 *)
-
Python
def a(n): return 3**(2**(2**n-1)) print([a(n) for n in range(4)]) # Michael S. Branicky, Nov 12 2022
Formula
a(n) = 3^((F(n)-1)/2) where F(n) is a Fermat number (A000215).
Extensions
Corrected offset, formula and example Harry J. Smith, Jul 04 2009
Comments