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.

Showing 1-2 of 2 results.

A094045 Alternate composite and prime numbers not included earlier such that every concatenation of a pair of terms is a prime: a(2n) is prime and a(2n-1) is nonprime.

Original entry on oeis.org

1, 3, 49, 19, 9, 7, 27, 11, 51, 13, 21, 29, 39, 17, 33, 23, 57, 37, 69, 47, 87, 31, 63, 43, 91, 61, 99, 41, 77, 53, 81, 67, 93, 71, 119, 59, 123, 73, 121, 97, 117, 79, 111, 103, 141, 101, 159, 113, 143, 89, 153, 83, 177, 109, 133, 157, 189, 127, 207, 139, 169, 151, 171, 131
Offset: 1

Views

Author

Robert G. Wilson v, Apr 23 2004

Keywords

Comments

Conjecture: 2 and 5 are the only two nonmembers.

Examples

			a(3)=49 => 349 is a prime but not necessarily 1349, which by the way it
is not.
		

Crossrefs

Programs

  • Mathematica
    p = Prime[ Range[ 500]]; np = Drop[ Complement[ Range[ 500], p], 1]; a[1] = 1; a[n_] := a[n] = Block[{k = 1, q = IntegerDigits[a[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}]

A345966 The succession of nonprime and prime terms is kept when you consider the sequence formed by the successive sums a(n) + a(n+1). This is the lexicographically earliest sequence of distinct positive terms with this property.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 8, 7, 10, 11, 12, 9, 13, 16, 14, 18, 15, 17, 20, 19, 22, 23, 24, 21, 25, 26, 28, 27, 29, 30, 32, 31, 36, 33, 35, 34, 38, 37, 42, 39, 41, 48, 40, 44, 43, 46, 45, 47, 50, 49, 51, 53, 54, 52, 56, 55, 57, 58, 59, 68, 60, 61, 66, 62, 63, 65, 64, 69, 67, 70, 71, 78, 72, 73, 76, 74, 79, 84, 75, 77
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jun 30 2021

Keywords

Comments

Here is the succession of nonprimes and primes in the sequence:
1, 3, 2, 5, 6, 4, 8, 7, 10, 11, 12, 9, 13, 16, 14, 18, 15,
n p p p n n n p n p n n p n n n n
The same succession is formed by a(n) + a(n+1):
4, 5, 7, 11, 10, 12, 15, 17, 21, 23, 21, 22, 29, 30, 32, 33, 32
n p p p n n n p n p n n p n n n n

Crossrefs

Programs

  • Mathematica
    seq[n_] := Module[{s = {1}, q, k}, Do[q = PrimeQ[s[[-1]]]; k = 1; While[!FreeQ[s, k] || PrimeQ[s[[-1]] + k] != q, k++]; AppendTo[s, k], {n}]; s]; seq[100] (* Amiram Eldar, Jun 30 2021 *)
Showing 1-2 of 2 results.