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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243294 Least number k > 1 such that a number composed of k consecutive ascending digits starting with n is prime. 0
171, 2, 179, 4, 29, 2, 5, 2, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
After the digit 9 comes 0 and it repeats.
If k could equal 1, the sequence becomes {171, 1, 1, 4, 1, 2, 1, 2, 13}.
It is interesting that when n is prime, a(n) is prime.
LINKS
EXAMPLE
78 is not prime. 789 is not prime. 7890 is not prime. 78901 is prime. Thus a(7) = 5 since 78901 is a 5-digit number.
PROG
(Python)
import sympy
from sympy import isprime
def a(n):
....num = str(n)
....for i in range(n+1, 10**3):
........num += str(i%10)
........if isprime(int(num)):
............return len(num)
n=1
while n < 10:
....print(a(n), end=', ')
....n+=1
(PARI) a(n) = {s = Str(n); i = n+1; while (1, if (i==10, i = 0); s = concat(s, i); i++; if (isprime(eval(s)), return (length(s))); ); } \\ Michel Marcus, Jun 04 2014
CROSSREFS
Cf. A120821.
Sequence in context: A114048 A187704 A263059 * A015975 A292090 A186871
KEYWORD
nonn,base,full,fini
AUTHOR
Derek Orr, Jun 02 2014
STATUS
approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)