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”).

Composites n such that concatenation of n and n-th prime is prime.
1

%I #13 Sep 08 2022 08:45:40

%S 4,6,12,18,27,30,35,36,42,45,46,54,56,57,58,82,85,92,93,99,115,117,

%T 119,121,123,136,141,145,147,159,161,171,175,176,177,206,215,222,225,

%U 237,243,261,273,274,282,285,291,295,296,303,309,315,319,322,327,328,332

%N Composites n such that concatenation of n and n-th prime is prime.

%H Vincenzo Librandi, <a href="/A154965/b154965.txt">Table of n, a(n) for n = 1..1000</a>

%e Concatenation of composite 4 and fourth prime 7 is the prime 47, hence 4 is in the sequence. Concatenation of composite 36 and 36th prime 151 is the prime 36151, hence 36 is in the sequence.

%t concatQ[n_]:=PrimeQ[FromDigits[Join[IntegerDigits[n],IntegerDigits[ Prime[n]]]]]; nn=400;Select[Complement[Range[nn],Prime[Range[ PrimePi[nn]]]],concatQ] (* _Harvey P. Dale_, Jun 05 2011 *)

%o (Magma) [ n: n in [1..340] | not IsPrime(n) and IsPrime(StringToInteger(IntegerToString(n) cat IntegerToString(NthPrime(n)))) ];

%Y Cf. A000040 (primes), A002808 (composites).

%K nonn,base,easy,less

%O 1,1

%A _Juri-Stepan Gerasimov_, Jan 18 2009

%E Edited and extended beyond a(4) by _Klaus Brockhaus_, Jan 20 2009