login
A210720
Primes formed by concatenating n, n, n, n, and 1 for n = 1, 2, 3,....
2
33331, 99991, 242424241, 404040401, 454545451, 464646461, 494949491, 525252521, 575757571, 737373731, 787878781, 949494941, 1021021021021, 1081081081081, 1091091091091, 1211211211211, 1291291291291, 1481481481481, 1511511511511
OFFSET
1,1
COMMENTS
This is to four (duplicated strings concatenated) as A210712 is to three (duplicated strings concatenated), and as A210511 is to two (duplicated strings concatenated).
LINKS
EXAMPLE
a(1) = 33331 because Concat(3,3,3,1) = 3331 which is in A000040.
MAPLE
A210720 := proc(n)
local p;
[n, n, n, n, 1] ;
p := digcatL(%) ;
if isprime(p) then
printf("%d, ", p) ;
end if;
end proc:
for n from 1 to 400 do
A210720(n) ;
end do: # R. J. Mathar, Feb 10 2013
MATHEMATICA
Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[1], {}}]], {n, 200}], PrimeQ] (* Vincenzo Librandi, Mar 15 2013 *)
Select[Table[FromDigits[Join[Flatten[IntegerDigits/@PadRight[{}, 4, n]], {1}]], {n, 200}], PrimeQ] (* Harvey P. Dale, Oct 16 2017 *)
PROG
(Magma) [nnnn1: n in [1..200] | IsPrime(nnnn1) where nnnn1 is Seqint([1] cat Intseq(n) cat Intseq(n) cat Intseq(n) cat Intseq(n))]; // Vincenzo Librandi, Mar 15 2013
CROSSREFS
Sequence in context: A043628 A205410 A337953 * A233751 A205212 A206220
KEYWORD
nonn,base,easy,changed
AUTHOR
Jonathan Vos Post, Jan 29 2013
STATUS
approved