login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 21:44 EDT 2024. Contains 372020 sequences. (Running on oeis4.)