login
A089762
a(1) = 1, then nonzero digits (1 to 9) such that every n-th concatenation is prime if n is prime else it is composite. The previous digits are so chosen that a single digit with prime index gives a prime.
0
1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 9, 1, 1, 1, 1, 4, 3, 4, 3, 1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 2, 3, 1, 1, 1, 2, 5, 9, 1, 1, 6, 9, 9, 1, 1, 2, 2, 7, 1, 1, 1, 2, 3, 9, 1, 1, 1, 1, 7, 1, 7, 9, 1, 1, 1, 7, 5, 3, 1, 2, 8, 3, 3, 7, 1, 1, 1, 3, 4, 7, 1, 1, 5, 9, 1, 1, 1, 1, 7, 3, 1, 1, 1, 1, 1, 1, 4, 9, 1, 1, 5, 7, 9, 3, 4, 3
OFFSET
1,3
COMMENTS
This is the lexicographically least sequence that fits the rule through 114 digits. There is no guarantee that it can be extended indefinitely. - David Wasserman, Oct 06 2005
EXAMPLE
The first 11 partial concatenations are 1,11,113,1131,11311,113112,1131121,11311211,113112111,1131121112,11311211129.
The 2nd, 3rd, 5th 7th and 11th terms are primes. The rest are composite.
PROG
(PARI) num = 111; n = 3; while (n < 115, isp = isprime(n); while (num%10 && isprime(num) != isp, num++); if (num%10, n++; num = 10*num + 1, num = (num - 1)\10 + 1; n--)); print(digits(num\10)); \\ David Wasserman, Sep 20 2005
CROSSREFS
Sequence in context: A370892 A174820 A099501 * A257567 A318440 A307790
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Nov 22 2003
EXTENSIONS
More terms from David Wasserman, Oct 06 2005
Edited by Charles R Greathouse IV, Apr 29 2010
STATUS
approved