The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A234965 Numbers n such that 123...n - (n+1) is prime. 0

%I #7 Jan 18 2014 16:37:18

%S 4,6,10,12,63,270,466,898,1647

%N Numbers n such that 123...n - (n+1) is prime.

%C a(10) > 2600. - _Giovanni Resta_, Jan 11 2014

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 20 03:21 EDT 2024. Contains 373512 sequences. (Running on oeis4.)