A096845 Numbers n for which 4*R_n - 1 is a prime, where R_n = 11...1 is the repunit (A002275) of length n.
1, 2, 3, 6, 9, 12, 30, 32, 183, 297, 492, 41316
Offset: 1
Examples
n=30 means that 444444444444444444444444444443 is prime.
Links
Programs
-
Mathematica
Do[ If[ PrimeQ[ 4(10^n - 1)/9 - 1], Print[n]], {n, 5000}] (* Robert G. Wilson v, Oct 14 2004 *) Select[Range[500],PrimeQ[FromDigits[PadLeft[{3},#,4]]]&] (* The program generates the first 11 terms of the sequence. *) (* Harvey P. Dale, Feb 10 2022 *)
Formula
a(n) = A056661(n) + 1.
Extensions
a(12) from Robert Price, Oct 25 2014
Comments