login
Nonprime numbers n such that concatenation of n and n-th prime is composite.
1

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

%S 1,8,9,10,14,15,16,20,21,22,24,25,26,28,32,33,34,38,39,40,44,48,49,50,

%T 51,52,55,60,62,63,64,65,66,68,69,70,72,74,75,76,77,78,80,81,84,86,87,

%U 88,90,91,94,95,96,98,100,102,104,105,106,108,110,111,112,114,116,118

%N Nonprime numbers n such that concatenation of n and n-th prime is composite.

%H Harvey P. Dale, <a href="/A154967/b154967.txt">Table of n, a(n) for n = 1..1000</a>

%e The concatenation of the nonprime 1 and the first prime 2 is the composite 12, hence 1 is in the sequence.

%e Concatenation of nonprime 9 and ninth prime 23 is the composite 923 = 13*71, hence 9 is in the sequence.

%t Select[Range[120],!PrimeQ[#]&&CompositeQ[FromDigits[Join[ IntegerDigits[ #], IntegerDigits[ Prime[#]]]]]&] (* _Harvey P. Dale_, Mar 08 2018 *)

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

%Y Cf. A000040 (primes), A002808 (composites), A018252 (nonprime numbers).

%K nonn,base,easy,less

%O 1,2

%A _Juri-Stepan Gerasimov_, Jan 18 2009

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