OFFSET
1,5
COMMENTS
Sum_{n=1..k} a(n) / Sum_{n=1..k} n tends to 2*log(3)/7.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
1*3^1*(3^1-1)-1=5 prime as 7 so k(1)=1 1*3^2*(3^2-1)-1=71 prime as 73 so k(2)=1
MATHEMATICA
lk[n_]:=Module[{c=3^n (3^n-1), k=1}, While[NoneTrue[k*c+{1, -1}, PrimeQ], k++]; k]; Array[lk, 90] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 23 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Dec 18 2008
EXTENSIONS
Corrected by Harvey P. Dale, Dec 23 2020
STATUS
approved