cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A094043 Alternate composite and prime numbers not included earlier such that every partial concatenation is a prime: a(2n) is prime and a(2n-1) is not prime.

This page as a plain text file.
%I A094043 #2 Mar 30 2012 17:31:00
%S A094043 1,3,9,13,63,107,27,67,39,23,49,29,99,439,207,41,357,229,77,139,69,
%T A094043 839,133,239,121,317,187,53,33,1291,177,557,171,1753,323,19,519,953,
%U A094043 231,523,321,251,327,31,299,2203,747,101,81,1741,291,6779,261,1549,1463,97,297
%N A094043 Alternate composite and prime numbers not included earlier such that every partial concatenation is a prime: a(2n) is prime and a(2n-1) is not prime.
%C A094043 Conjecture: 2 and 5 are the only two nonmembers.
%e A094043 1, 13, 139, 13913, 1391363, 1391363107,..., etc. are not composite.
%t A094043 p = Prime[ Range[ 1500]]; np = Drop[ Complement[ Range[ 1500], p], 1]; a[1] = 1; a[n_] := a[n] = Block[{k = 1, q = Flatten[ IntegerDigits[ # ] & /@ Table[ a[i], {i, n - 1}]]}, If[ EvenQ[n], While[ !PrimeQ[ FromDigits[ Join[q, IntegerDigits[ p[[k]] ]]]], k++ ]; q = p[[k]]; p = Delete[p, k]; q, While[ !PrimeQ[ FromDigits[ Join[q, IntegerDigits[ np[[k]] ]]]], k++ ]; q = np[[k]]; np = Delete[np, k]; q]]; Table[ a[n], {n, 60}]
%Y A094043 Cf. A088614, A094045.
%K A094043 nonn,base
%O A094043 1,2
%A A094043 _Robert G. Wilson v_, Apr 23 2004