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.

A380092 Number of consecutive primes after prime(n) before their concatenation fails to produce a prime.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Robert G. Wilson v, Jan 12 2025

Keywords

Examples

			a(1) = 1 since prime(1) = 2 can be concatenated with the next prime 3 to 23 which is prime, but the next concatenation with 5 is 235 which is not prime.
a(2) = 0 since prime(2) = 3 but concatenating the next prime 5 is 35 which is not prime.
a(11) = 2 since prime(11) = 31 concatenates: 3137 is prime, 313741 is prime, but 31374143 is not prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 0, p = Prime@ n}, While[ PrimeQ[ FromDigits[ Flatten[ IntegerDigits[ NextPrime[p, Range[0, k]]]]]], k++]; --k]; Array[a, 105]

Formula

a(n) = 0 iff (p_(n+1) - p_n)/2 == 1 (mod 2).
a(n) > 0 iff n is in A030459.