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.

A083677 Define f(n, k) to be the concatenation of the first n primes, with n-1 k's inserted between the primes. Then a(n) is the smallest k >= 0 such that f(n, k) is prime, or -1 if no such prime exists.

Original entry on oeis.org

0, 2, -1, 1, 4, 10, 38, 20, 0, -1, 163, 46, 8, 53, 0, -1, 74, 5, 8, 5, 180, 4, 280, 191, 0, 337, 191, -1, 105, 88, 19, 28, 111, -1, 525, 13, 24, 102, 159, -1, 288, 142, 31, 743, 81, -1, 183, 202, 100, 96, 380, -1, 1227, 5, 113, 123, 20, 23, 0, 48, 148, 438, 52, 144, 128, 297, 206
Offset: 1

Views

Author

Farideh Firoozbakht, Jun 15 2003

Keywords

Comments

a(3) = -1 because f(3, k) is always a multiple of 5. For any n such that n = 1 (mod 3) and A007504(n) = 0 (mod 3), a(n) = -1 because f(n, k) is always a multiple of 3. It is my conjecture that for all other n, -1 < a(n) < n*p(n). I've checked for all n < 270.

Examples

			a(4) = 1 because 2030507 is composite and 2131517 is prime.
		

Crossrefs

A082549 gives the n such that a(n) = 0. A083684 gives the n such that a(n)=-1.

Programs

  • Mathematica
    fpkQ[k_, n_] := PrimeQ[ FromDigits[ Flatten[ IntegerDigits /@ Insert[ Table[ Prime[i], {i, k}], n, Table[{i}, {i, 2, k}]]]]]; a[1] = 0; a[3] = a[10] = a[16] = a[28] = a[34] = a[40] = a[46] = a[52] = a[70] = a[76] = a[82] = a[88] = a[97] = -1; a[n_] := Block[{k = 0}, While[ fpkQ[n, k] != True, k++ ]; k]; Table[ a[n], {n, 70}] (* Robert G. Wilson v, Dec 11 2004 *)

Extensions

Edited and extended by Robert G. Wilson v, Dec 11 2004