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.

A365513 Lexicographically earliest permutation of the nonnegative integers with the property that the successive sizes of the gaps between nonprime terms and the successive sizes of the gaps between nonprime digits show the same pattern.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 11, 15, 16, 18, 20, 21, 13, 22, 24, 25, 26, 17, 27, 19, 28, 30, 23, 29, 31, 37, 32, 41, 43, 47, 33, 34, 53, 59, 61, 35, 36, 67, 38, 71, 39, 73, 79, 83, 40, 89, 42, 97, 101, 103, 107, 44, 45, 46, 109, 48
Offset: 1

Views

Author

Eric Angelini, Sep 07 2023

Keywords

Comments

The nonprime integers and the prime numbers appear in their natural order.

Examples

			Sequence read as a succession of terms:
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 11, 15, 16, ...
The gaps between nonprime terms are of size:
  0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ...
Sequence read as a succession of digits:
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 2, 1, 4, 1, 1, 1, 5, 1, 6, ...
The gaps between nonprime digits are of size:
  0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ...
		

Crossrefs

Cf. A284516.

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=(k=1;While[MemberQ[s=Array[a,n-1],k]||PrimeQ@k!= PrimeQ[Flatten[IntegerDigits/@Join[s,{k}]][[n]]],k++];k);Array[a,70] (* Giorgos Kalogeropoulos, Sep 07 2023 *)