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!)
 A181523 Greatest k < n such that 3^n - 3^k + 1 is prime or 0 if no such prime exists. 3
 0, 1, 2, 2, 4, 5, 6, 4, 7, 9, 6, 10, 3, 10, 12, 0, 16, 17, 12, 17, 12, 3, 20, 22, 21, 17, 22, 0, 0, 22, 30, 29, 11, 31, 32, 18, 17, 35, 35, 37, 12, 25, 38, 14, 15, 12, 42, 37, 35, 42, 42, 36, 40, 52, 54, 16, 48, 57, 35, 58 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Pierre CAMI, Table of n, a(n) for n = 1..2000 MAPLE A181523 := proc(n) local p, k; for k from n-1 to 0 by -1 do p := 3^n-3^k+1 ; if isprime(p) then return k; end if; end do: return 0 ; end proc: seq(A181523(n), n=1..80) ; # R. J. Mathar, Jan 31 2011 PROG (Sage) A181523 = lambda n: next((k for k in reversed(IntegerRange(1, n)) if is_pseudoprime(3^n-3^k+1)), 0) # D. S. McNeil, Jan 31 2011 CROSSREFS Cf. A181515. Sequence in context: A137413 A010848 A133937 * A181537 A130498 A263433 Adjacent sequences:  A181520 A181521 A181522 * A181524 A181525 A181526 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 June 18 18:09 EDT 2021. Contains 345120 sequences. (Running on oeis4.)