login
A185069
Primes of the form k*6^m +1 with k prime and m an integer.
5
3, 13, 19, 31, 43, 67, 73, 79, 103, 109, 139, 181, 223, 283, 367, 397, 433, 439, 499, 607, 613, 619, 643, 787, 823, 829, 907, 1039, 1087, 1117, 1399, 1447, 1543, 1549, 1579, 1627, 1663, 1693, 1699, 1759, 1867, 1879, 1987, 2083, 2203, 2239, 2377
OFFSET
1,1
COMMENTS
Companion sequence to A186782.
LINKS
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)
A185069_list = [p for p in primes(3000) if is_A185069(p)] # D. S. McNeil, Feb 20 2011
(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