This site is supported by donations to The OEIS 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 not 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  (* From Harvey P. Dale, Feb 12 2011 *) CROSSREFS Sequence in context: A179590 A167504 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 | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .