OFFSET
1,3
FORMULA
a(n) = A003306(n+1)-1. - Bruno Berselli, Sep 27 2012
EXAMPLE
3 is in the sequence because 6*3^3 + 1 = 163 is prime;
7 is not in the sequence because 6*3^7 + 1 = 13123 = 11*1193 is composite.
MATHEMATICA
Select[Range[5000], PrimeQ[6 3^# + 1] &]
PROG
(Magma) /* Gives only the terms up to 1453: */ [n: n in [0..1500] | IsPrime(6*3^n + 1)];
(PARI) is(n)=ispseudoprime(6*3^n+1) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
Vincenzo Librandi, Sep 26 2012
EXTENSIONS
More terms from Vincenzo Librandi, Oct 01 2012
STATUS
approved