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.

A154722 Triangle read by rows in which row n lists: n, in the center of the row and the pairs of noncomposite numbers that are equidistant to n, as shown below in the example.

This page as a plain text file.
%I A154722 #11 Apr 26 2025 15:27:03
%S A154722 1,1,2,3,1,3,5,1,3,4,5,7,3,5,7,1,5,6,7,11,1,3,7,11,13,3,5,8,11,13,1,5,
%T A154722 7,9,11,13,17,1,3,7,10,13,17,19,3,5,11,17,19,1,5,7,11,12,13,17,19,23,
%U A154722 3,7,13,19,23,5,11,14,17,23,1,7,11,13,15
%N A154722 Triangle read by rows in which row n lists: n, in the center of the row and the pairs of noncomposite numbers that are equidistant to n, as shown below in the example.
%H A154722 Nathaniel Johnston, <a href="/A154722/b154722.txt">Table of n, a(n) for n = 1..5000</a>
%e A154722 Triangle begins:
%e A154722 . . . . . . . . . . . . . . .1
%e A154722 . . . . . . . . . . . . . 1, 2, 3
%e A154722 . . . . . . . . . . . .1, .. 3, .. 5
%e A154722 . . . . . . . . . . 1, .. 3, 4, 5, .. 7
%e A154722 . . . . . . . . ... .. 3, .. 5, .. 7, .. .
%e A154722 . . . . . . . 1, .. .. .. 5, 6, 7, .. .. .,11
%e A154722 . . . . . .1, .. 3, .. .. .. 7, .. .. ..11, ..13
%e A154722 . . . . .. .. 3, .. 5, .. .. 8, .. ..11, ..13, .. .
%e A154722 . . .1, .. .. .. 5, .. 7, .. 9, ..11, ..13, .. .. ..17
%e A154722 . 1, .. 3, .. .. .. 7, .. .,10, .. ..13, .. .. ..17, ..19
%p A154722 isnotcomp:=proc(n)return (n=1 or isprime(n)) end:
%p A154722 for n from 1 to 10 do for k from 1 to 2*n-1 do if(k=n or (isnotcomp(k) and isnotcomp(2*n-k)))then print(k):fi:od:od: # _Nathaniel Johnston_, Apr 18 2011
%t A154722 Select[Flatten@Table[If[k == n  || ! CompositeQ[k] && ! CompositeQ[2 n - k], k, 0], {n, 10}, {k, 2 n - 1}], # > 0 &]  (* _Robert Price_, Apr 26 2025 *)
%Y A154722 Cf. A000040, A008578, A154720, A154721, A154723, A154724, A154725, A154726, A154727.
%K A154722 easy,nonn,tabf
%O A154722 1,3
%A A154722 _Omar E. Pol_, Jan 14 2009
%E A154722 a(45) - a(73) from _Nathaniel Johnston_, Apr 18 2011