%I #11 Sep 25 2023 07:47:42
%S 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,
%T 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,
%U 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
%N 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.
%C 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
%e The first 11 partial concatenations are 1,11,113,1131,11311,113112,1131121,11311211,113112111,1131121112,11311211129.
%e The 2nd, 3rd, 5th 7th and 11th terms are primes. The rest are composite.
%o (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
%K nonn,base
%O 1,3
%A _Amarnath Murthy_, Nov 22 2003
%E More terms from _David Wasserman_, Oct 06 2005
%E Edited by _Charles R Greathouse IV_, Apr 29 2010
|