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.

A352707 Array read by ascending antidiagonals T(n,k) = abs(prime(n)-nonprime(k)).

Original entry on oeis.org

1, 2, 2, 4, 1, 4, 6, 1, 3, 6, 10, 3, 1, 5, 7, 12, 7, 1, 3, 6, 8, 16, 9, 5, 1, 4, 7, 10, 18, 13, 7, 3, 2, 5, 9, 12, 22, 15, 11, 5, 2, 3, 7, 11, 13, 28, 19, 13, 9, 4, 1, 5, 9, 12, 14, 30, 25, 17, 11, 8, 3, 1, 7, 10, 13, 16, 36, 27, 23, 15, 10, 7, 1, 3, 8, 11, 15, 18
Offset: 1

Views

Author

Michel Marcus, Apr 19 2022

Keywords

Examples

			First few rows of array:
   1  2  4 6 7 8 10
   2  1  3 5 6 7  9
   4  1  1 3 4 5  7
   6  3  1 1 2 3  5
  10  7  5 3 2 1  1
  12  9  7 5 4 3  1
  16 13 11 9 8 7  5
		

Crossrefs

Cf. A000040 (primes), A018252 (nonprimes), A006093.

Programs

  • PARI
    nonprime(n) = my(a=1, b=n); while(a!=b, a=b; b=n+primepi(a)); b; \\ A018252
    T(n,k) = abs(prime(n)-nonprime(k));

Formula

T(n,1) = A006093(n).