The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A181515 Greatest k < n such that 3^n - 3^k - 1 is prime, or 0 if no such prime exists. 4
 0, 1, 2, 3, 2, 4, 0, 7, 8, 4, 7, 10, 12, 7, 10, 12, 13, 15, 17, 17, 20, 16, 15, 23, 17, 8, 3, 27, 24, 22, 19, 23, 25, 23, 30, 35, 13, 31, 22, 30, 21, 39, 17, 37, 32, 40, 42, 45, 45, 43, 45, 50, 50, 48, 34, 53, 56, 0, 54, 25 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Pierre CAMI, Table of n, a(n) for n = 1..2000 MAPLE A181515 := proc(n) local p, k; for k from n-1 to 1 by -1 do p := 3^n-3^k-1 ; if isprime(p) then return k; end if; end do: return 0 ; end proc: # R. J. Mathar, Jan 30 2011 MATHEMATICA Table[Max[Flatten[Position[3^n-3^Range[n-1]-1, _?PrimeQ]]], {n, 60}]/.-\[Infinity]->0  (* Harvey P. Dale, Feb 12 2011 *) CROSSREFS Sequence in context: A167504 A286013 A208083 * A183045 A060847 A079528 Adjacent sequences:  A181512 A181513 A181514 * A181516 A181517 A181518 KEYWORD nonn AUTHOR Pierre CAMI, Jan 29 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 1 19:31 EDT 2021. Contains 346402 sequences. (Running on oeis4.)