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.

A359299 Array T(n, k) read by antidiagonals: for n >= 0 and k >= 0, row n lists the positive integers m such that m + k is prime or 1, and m + h, for 0 <= h < k, is not prime.

This page as a plain text file.
%I A359299 #9 Jan 08 2023 11:44:20
%S A359299 1,2,4,3,6,9,5,10,15,8,7,12,21,14,25,11,16,27,20,33,24,13,18,35,26,49,
%T A359299 32,91,17,22,39,34,55,48,121,90,19,28,45,38,63,54,143,120,119,23,30,
%U A359299 51,44,75,62,185,142,141,118,29,36,57,50,85,74,205,184,183
%N A359299 Array T(n, k) read by antidiagonals: for n >= 0 and k >= 0, row n lists the positive integers m such that m + k is prime or 1, and m + h, for 0 <= h < k, is not prime.
%C A359299 Essentially, for n >= 0, row n lists the numbers whose distance down to the nearest prime is n.
%e A359299 Corner:
%e A359299     1     2      3     5     7    11    13    17    19      23     29
%e A359299     4     6     10    12    16    18    22    28    30      36     40
%e A359299     9    15     21    27    35    39    45    51    57      65     69
%e A359299     8    14     20    26    34    38    44    50    56      64     68
%e A359299    25    33     49    55    63    75    85    93    123    133    145
%e A359299    24    32     48    54    62    74    84    92    122    132    144
%e A359299 Row 0 includes 19 because 19 is prime, and 19 - 19 = 0.
%e A359299 Row 1 includes 10 because the nearest prime up from 10 is 11, and 11 - 10 = 1.
%t A359299 rows = 15;
%t A359299 row[0] = Join[{1}, Map[Prime, Range[250]]]; Table[
%t A359299 row[z] = Map[#[[1]] &, Select[Map[{#, Apply[And,
%t A359299 Join[{MemberQ[row[0], # + z]}, Table[! MemberQ[row[0], # + k],
%t A359299  {k, 0, z - 1}]]]} &,
%t A359299 Range[Max[row[z - 1]]]], #[[2]] &]], {z, rows}];
%t A359299 Table[row[z], {z, 0, rows}] // ColumnForm   (* A359299 array *)
%t A359299 t[n_, k_] := row[n - 1][[k]]
%t A359299 u = Table[t[n - k + 1, k], {n, 15}, {k, n, 1, -1}] //
%t A359299 Flatten  (* A359299 sequence *)
%t A359299 (* _Peter J. C. Moses_ Dec 18 2022 *)
%Y A359299 Cf. A000040, A008578, A359298, A359300.
%K A359299 nonn,tabl
%O A359299 1,2
%A A359299 _Clark Kimberling_, Jan 01 2023