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.

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

Original entry on oeis.org

2, 9, 3, 27, 11, 51, 13, 33, 41, 93, 31, 99, 29, 63, 1117, 441, 503, 303, 163, 171, 59, 357, 67, 219, 113, 417, 691, 729, 239, 511, 227, 393, 211, 189, 3797, 291, 1789, 549, 419, 501, 103, 81, 3257, 39, 727, 531, 617, 69, 6883, 387, 521, 153, 1237, 287, 3391, 927
Offset: 1

Views

Author

Amarnath Murthy, Oct 16 2003

Keywords

Comments

Conjecture: 1 and 5 are the only two odd nonmembers.

Examples

			2,29,293,29327,...etc. are primes.
		

Crossrefs

Cf. A088615.

Programs

  • Mathematica
    p = Prime[ Range[ 1000]]; np = Complement[ Range[ 1000], p]; a[n_] := a[n] = Block[{k = 1, q = Flatten[ IntegerDigits[ # ] & /@ Table[ a[i], {i, n - 1}]]}, If[ OddQ[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, 56}] (* Robert G. Wilson v, Apr 23 2004 *)

Extensions

More terms from Ray Chandler, Oct 18 2003