OFFSET
1,1
COMMENTS
Companion sequence to A186782.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
5*6^1+1 = 31 is prime and therefore a term.
7*6^2+1 = 253 is composite and therefore not in the sequence.
17*6^13+1 = 222031798273 is prime and therefore a term (see also its companion in A186782).
MATHEMATICA
Module[{upto=3000, pr}, pr=PrimePi[upto]+1; Select[Sort[Flatten[ Table[ k*6^m+1, {k, Prime[Range[pr]]}, {m, 0, Log[6, (upto-1)/6]}]]], PrimeQ[#] && 185#<=upto&]](* Harvey P. Dale, Dec 30 2018 *)
PROG
(SageMath)
def is_A185069(n):
k = n - 1
while k % 6 == 0: k //= 6
return is_prime(k)
(Magma) IsA185069:=function(n); k:=n-1; while k mod 6 eq 0 do k:=(k div 6); end while; return IsPrime(k); end function; [ n: n in PrimesUpTo(3000) | IsA185069(n) ];
CROSSREFS
KEYWORD
nonn
AUTHOR
Gilbert Mozzo, Feb 18 2011
EXTENSIONS
Edited by N. J. A. Sloane, Feb 20 2011
STATUS
approved
