%I #11 Jul 07 2024 01:42:50
%S 4,6,10,12,63,270,466,898,1647
%N Numbers k such that 123...k - (k+1) is prime.
%C a(10) > 2600. - _Giovanni Resta_, Jan 11 2014
%C a(10) > 20000. - _Michael S. Branicky_, Jul 06 2024
%e 1234 - 5 = 1229 is prime so 4 is a member of this sequence.
%e 123456 - 7 = 123449 is prime so 6 is a member of this sequence.
%t c = 0; Do[c = n + c*10^IntegerLength[n]; If[PrimeQ[c-n-1)], Print@n], {n, 1700}] (* _Giovanni Resta_, Jan 11 2014 *)
%o (Python)
%o def Concatenate(x):
%o ..num = ''
%o ..for n in range(1,x+1):
%o ....num += str(n)
%o ..return int(num)
%o import sympy
%o from sympy import isprime
%o {print(x) for x in range(1,10**3) if isprime(Concatenate(x)-(x+1))}
%Y Cf. A234964, A007908.
%K nonn,base,more
%O 1,1
%A _Derek Orr_, Jan 02 2014
%E a(9) from _Giovanni Resta_, Jan 11 2014
|