OFFSET
1,2
COMMENTS
Also numbers n such that the generalized near-repunit 444...445 (in base 6) of length n is prime.
Numbers corresponding to a(n) > 3963 are only strong probable primes; smaller ones were proved with Primo-4.0.5.
Note that there are no multiples of 4 in this sequence. That's because if n = 4m, then (4 * 6^n + 1)/5 = (2 * 6^(2m) + 2 * 6^m + 1)/5 * (2 * 6^(2m) - 2*6^m + 1).
LINKS
Eric Weisstein's World of Mathematics, Repunit.
EXAMPLE
For n = 5, a(5) = 15 because (4 * 6^15 + 1)/5 = 376147987661 is prime. (In base 6, that is 444444444444445.)
MAPLE
A248613:=n->`if`(isprime((4*6^n+1)/5), n, NULL): seq(A248613(n), n=1..10^3); # Wesley Ivan Hurt, Oct 09 2014
MATHEMATICA
Select[Range[1000], PrimeQ[(4 * 6^# + 1)/5] &]
PROG
(PARI)
for(n=1, 22582, if(n%4>0 && ispseudoprime((4*6^n+1)/5), print1(n, ", ")));
\\ if n % 4 == 0, no primes due to Aurifeuillean factorization
(Magma) [n: n in [0..300] | IsPrime((4*6^n+1) div 5)]; // Vincenzo Librandi, Oct 17 2014
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Serge Batalov, Oct 09 2014
STATUS
approved