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.

A192176 Index array for A192175 (distance up to next prime), by antidiagonals.

This page as a plain text file.
%I A192176 #9 Feb 13 2014 13:24:09
%S A192176 1,2,4,3,6,9,5,8,11,24,7,12,15,72,34,10,14,16,77,42,46,13,19,18,79,53,
%T A192176 47,30,17,22,21,87,61,91,62,282,20,25,23,92,68,97,66,295,99,26,27,32,
%U A192176 94,80,114,137,319,180,154,28,29,36,124,82,121,146,331,205,259,189
%N A192176 Index array for A192175 (distance up to next prime), by antidiagonals.
%C A192176 Row 1: numbers k such that p + 1 or p + 2 is a prime,
%C A192176 where p = (k-th prime).
%C A192176 Row r > 1: numbers k such that if p = (k-th prime) then r = (least h for which p + 2 h) is a prime.
%C A192176 Every positive integer occurs exactly once, so that as a sequence, A192176 is a permutation of the positive integers.
%e A192176 Northwest corner:
%e A192176 1....2....3....5....7....10....13
%e A192176 4....6....8....12...14...19....22
%e A192176 9....11...15...16...18...21....23
%e A192176 24...72...77...79...87...92....94
%e A192176 34...42...53...61...68...80....82
%e A192176 ...
%e A192176 These are the index numbers of the primes displayed in the Example at A192175; e.g., in that display, the top row begins with 2,3,5,11,17,29,41.
%t A192176 z = 5000; (* z = number of primes used *)
%t A192176 row[1] = (#1[[1]] &) /@ Cases[Array[{#1, PrimeQ[1 + Prime[#1]] || PrimeQ[2 + Prime[#1]]} &, {z}], {_, True}]; Do[row[x] = Complement[(#1[[1]] &) /@ Cases[Array[{#1, PrimeQ[2 x + Prime[#1]]} &, {z}], {_, True}],Flatten[Array[row, {x - 1}]]], {x, 2, 16}];
%t A192176 TableForm[Array[row, {16}]]   (* A192176 array *)
%t A192176 Flatten[Table[row[k][[n - k + 1]], {n, 1, 11}, {k, 1, n}]]   (* A192176 sequence *)
%t A192176 (* by _Peter J. C. Moses_, Jun 20 2011 *)
%Y A192176 Cf. A192175, A192177, A192178, A192179.
%K A192176 nonn,tabl
%O A192176 1,2
%A A192176 _Clark Kimberling_, Jun 24 2011