login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A109550
Primes of the form aaaa...aa1 where a is 3, 4, 5, 6 or 7.
1
31, 41, 61, 71, 331, 661, 3331, 4441, 6661, 33331, 333331, 3333331, 33333331, 6666666661, 44444444441, 555555555551, 5555555555551, 7777777777771, 333333333333333331, 666666666666666661, 77777777777777777771
OFFSET
1,1
LINKS
FORMULA
d=3, 4, 5, 6, 7 a(n) = if prime then Sum[d*10^i, {i, 1, m}] + 1
MATHEMATICA
d[n_] = If[2 + Mod[n, 6] > 0, 2 + Mod[n, 6], 1] a = Flatten[Table[Sum[d[k]*10^i, {i, 1, m}] + 1, {m, 1, 50}, {k, 1, 4}]] b = Flatten[Table[If[PrimeQ[a[[i]]] == True, a[[i]], {}], {i, 1, Length[a]}]]
Select[FromDigits/@Flatten[Table[PadLeft[{1}, i, #]&/@{3, 4, 5, 6, 7}, {i, 2, 100}], 1], PrimeQ[#]&] (* Vincenzo Librandi, Dec 12 2011 *)
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Jun 26 2005
STATUS
approved