login
A186732
Closest prime to 3^n (in case of a tie, choose the smaller prime).
1
3, 7, 29, 79, 241, 727, 2179, 6563, 19681, 59051, 177131, 531457, 1594331, 4782971, 14348909, 43046747, 129140153, 387420479, 1162261453, 3486784393, 10460353199, 31381059607, 94143178807, 282429536483, 847288609457
OFFSET
1,1
COMMENTS
Nearest prime program by Ignacio Grande in LinkedIn Mathematica users group as answer to my question. 83 is why the 4th term is called "lowest" or "smallest" for a dual prime near 3^4.
MATHEMATICA
f[n_] := Block[{m = 3^n}, Min@ Nearest[ Select[{NextPrime[m, -1], m, NextPrime[m]}, PrimeQ], m]]; Array[f, 25] (* Robert G. Wilson v, Jan 21 2012 *)
CROSSREFS
Sequence in context: A148759 A148760 A148761 * A148762 A096064 A148763
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jan 21 2012
EXTENSIONS
a(16)-a(25) from Robert G. Wilson v, Jan 21 2012
STATUS
approved