cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A210712 Primes formed by concatenating n, n, n, and 1 for n = 1, 2, 3,....

This page as a plain text file.
%I A210712 #19 Sep 08 2022 08:46:01
%S A210712 2221,3331,4441,6661,1212121,1616161,2323231,2424241,2828281,3131311,
%T A210712 3232321,3333331,3636361,3838381,4040401,4242421,4545451,5454541,
%U A210712 5858581,6262621,6868681,6969691,7171711,7272721,8282821,9090901,9999991,1161161161
%N A210712 Primes formed by concatenating n, n, n, and 1 for n = 1, 2, 3,....
%C A210712 This is to three (duplicated strings concatenated) as A210511 is to two (duplicated strings concatenated).
%H A210712 Vincenzo Librandi, <a href="/A210712/b210712.txt">Table of n, a(n) for n = 1..1000</a>
%e A210712 a(1) = 2221 because "2" concatenated with "2" concatenated with "2" concatenated with "1" = 2221, which is prime.
%e A210712 9393931 is not in the sequence, even though formed by concatenating n, n, n, and 1 for n = 93, because 9393931 = 211^3 is composite.
%t A210712 Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[1],{}}]], {n, 1000}], PrimeQ] (* _Vincenzo Librandi_, Mar 13 2013 *)
%t A210712 Select[FromDigits/@Table[Flatten[IntegerDigits/@PadLeft[{1},4,n]],{n,120}],PrimeQ] (* _Harvey P. Dale_, May 12 2015 *)
%o A210712 (Magma) [nnn1: n in [1..120] | IsPrime(nnn1) where nnn1 is Seqint([1] cat Intseq(n) cat Intseq(n) cat Intseq(n))]; // _Bruno Berselli_, Jan 30 2013
%o A210712 (PARI) a(n) = { my(p=Str(prime(n))); eval(concat(concat(concat(p,p),p),1)); } /* _Joerg Arndt_, Mar 14 2013 */
%Y A210712 Cf. A210511.
%K A210712 nonn,base,easy
%O A210712 1,1
%A A210712 _Jonathan Vos Post_, Jan 29 2013