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.

A337767 Array T(n,k) (n >= 1, k >= 1) read by upward antidiagonals and defined as follows. Let N(p,i) denote the result of applying "nextprime" i times to p; T(n,k) = smallest prime p such that N(p,n) - p = 2*k, or 0 if no such prime exists.

This page as a plain text file.
%I A337767 #112 Jul 19 2024 19:29:18
%S A337767 3,0,7,0,3,23,0,0,5,89,0,0,0,23,139,0,0,0,3,19,199,0,0,0,0,7,47,113,0,
%T A337767 0,0,0,3,17,83,1831,0,0,0,0,0,5,23,211,523,0,0,0,0,0,0,17,43,109,887,
%U A337767 0,0,0,0,0,0,3,13,79,317,1129,0,0,0,0,0,0,0,7,19,107,619,1669
%N A337767 Array T(n,k) (n >= 1, k >= 1) read by upward antidiagonals and defined as follows. Let N(p,i) denote the result of applying "nextprime" i times to p; T(n,k) = smallest prime p such that N(p,n) - p = 2*k, or 0 if no such prime exists.
%C A337767 The positive entries in each row and column are distinct.
%C A337767 Number of zeros right of 3 are 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 3, 3, 3, 6, 5, 5, 4, 6, ..., .
%C A337767 Number of zeros in the n-th row are 0, 1, 3, 4, 6, 7, 10, 13, 14, 17, 18, 20, 22, 25, 28, 30, 32, 36, 37, 40, 45, 47, 51, 52, 55, ..., .
%C A337767 The usual convention in the OEIS is to use -1 in the "escape clause" - that is, when "no such terms exists". It is probably too late to change this sequence, but it should not be cited as a role model for other sequences. - _N. J. A. Sloane_, Jan 19 2021
%C A337767 a(1416), a(1637), and a(1753) were provided by Brian Kehrig. - _Martin Raab_, Jun 28 2024
%H A337767 Martin Raab, <a href="/A337767/b337767.txt">Table of n, a(n) for n = 1..1830</a> (antidiagonals 1..60)
%F A337767 T(n,k) = 0 if prime(n+2)-5 <= 2k. A089038.
%F A337767 T(n,k) = 3 if prime(n+2) = 2k+6. A067076.
%e A337767 The initial rows of the array are:
%e A337767   3, 7, 23, 89, 139, 199, 113, 1831, 523, 887, 1129, 1669, 2477, 2971, 4297, ...
%e A337767   0, 3, 5, 23, 19, 47, 83, 211, 109, 317, 619,  199, 1373, 1123, 1627, 4751, ...
%e A337767   0, 0, 0,  3,  7, 17, 23,  43,  79, 107, 109,  113,  197,  199,  317,  509, ...
%e A337767   0, 0, 0,  0,  3,  5, 17,  13,  19,  47,  79,   73,  113,  109,  193,  317, ...
%e A337767   0, 0, 0,  0,  0,  0,  3,   7,  11,  17,  19,   43,   71,   73,  107,  191, ...
%e A337767   0, 0, 0,  0,  0,  0,  0,   3,   5,  11,   7,   13,   41,   31,   67,  107, ...
%e A337767   0, 0, 0,  0,  0,  0,  0,   0,   0,   3,   0,    5,   11,   13,   23,   47, ...
%e A337767   0, 0, 0,  0,  0,  0,  0,   0,   0,   0,   0,    0,    3,    0,    7,   29, ...
%e A337767   0, 0, 0,  0,  0,  0,  0,   0,   0,   0,   0,    0,    0,    3,    0,    5, ...
%e A337767 The initial antidiagonals are:
%e A337767   [3]
%e A337767   [0, 7]
%e A337767   [0, 3, 23]
%e A337767   [0, 0, 5, 89]
%e A337767   [0, 0, 0, 23, 139]
%e A337767   [0, 0, 0, 3, 19, 199]
%e A337767   [0, 0, 0, 0, 7, 47, 113]
%e A337767   [0, 0, 0, 0, 3, 17, 83, 1831]
%e A337767   [0, 0, 0, 0, 0, 5, 23, 211, 523]
%e A337767   [0, 0, 0, 0, 0, 0, 17, 43, 109, 887]
%e A337767   [0, 0, 0, 0, 0, 0, 3, 13, 79, 317, 1129]
%e A337767   ...
%t A337767 t[r_, c_] := If[ 2c <= Prime[r + 2] - 5, 0, Block[{p = 3}, While[ NextPrime[p, r] != 2c + p && p < 52000000, p = NextPrime@ p]; If[p > 52000000, 0, p]]]; Table[ t[r -c +1, c], {r, 11}, {c, r}] // Flatten
%Y A337767 Cf. A000230, A144103, A339943, A339944 (rows 1 to 4), A086153.
%K A337767 nonn,tabl
%O A337767 1,1
%A A337767 _Robert G. Wilson v_, Sep 19 2020
%E A337767 Entry revised by _N. J. A. Sloane_, Nov 07 2020
%E A337767 Deleted a-file and b-file because entries were unreliable. - _N. J. A. Sloane_, Nov 01 2021