login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377364
a(n) = least k such that 2n*3^k-2 is prime, or 0 if no prime is reached.
1
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 4, 5, 1, 2, 1, 2, 1, 1, 1, 9, 2, 1, 4, 1, 1, 2, 1, 5, 1, 1, 11, 1, 2, 2, 4, 3, 1, 1, 1, 3, 2, 4, 1, 1, 5, 3, 1, 1, 3, 1, 2, 4, 1, 1, 1, 2, 2, 1, 5, 1, 3, 1, 2, 1, 1, 8, 3, 1, 1, 4, 2, 80, 1, 6, 1, 8, 2, 2
OFFSET
1,4
EXAMPLE
a(20) = 5 because 40*3^5 + 1 is prime and 40*3^k + 1 is not prime for k=1..4.
MATHEMATICA
{b, h} = {3, 2}; f[n_, k_] := n*b^k - h
s[n_] := Select[Range[20], PrimeQ[f[n, #]] &, 1]
Flatten[Table[s[n], {n, 1, 200}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 31 2024
STATUS
approved