login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A234965
Numbers k such that 123...k - (k+1) is prime.
0
4, 6, 10, 12, 63, 270, 466, 898, 1647
OFFSET
1,1
COMMENTS
a(10) > 2600. - Giovanni Resta, Jan 11 2014
a(10) > 20000. - Michael S. Branicky, Jul 06 2024
EXAMPLE
1234 - 5 = 1229 is prime so 4 is a member of this sequence.
123456 - 7 = 123449 is prime so 6 is a member of this sequence.
MATHEMATICA
c = 0; Do[c = n + c*10^IntegerLength[n]; If[PrimeQ[c-n-1)], Print@n], {n, 1700}] (* Giovanni Resta, Jan 11 2014 *)
PROG
(Python)
def Concatenate(x):
..num = ''
..for n in range(1, x+1):
....num += str(n)
..return int(num)
import sympy
from sympy import isprime
{print(x) for x in range(1, 10**3) if isprime(Concatenate(x)-(x+1))}
CROSSREFS
Sequence in context: A310582 A177929 A086493 * A320881 A224796 A190370
KEYWORD
nonn,base,more
AUTHOR
Derek Orr, Jan 02 2014
EXTENSIONS
a(9) from Giovanni Resta, Jan 11 2014
STATUS
approved