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.
%I A299714 #22 Nov 10 2023 10:39:50 %S A299714 1,2,3,1,4,7,5,6,1,2,4,7,10,12,13,8,9,1,3,4,7,10,13,16,17,19,11,2,7, %T A299714 12,17,22,1,4,7,10,13,16,19,22,25,14,15,1,4,5,7,10,13,16,19,22,25,27, %U A299714 28,31,2,3,7,10,12,17,22,24,27,31,32,18,1,4,6,7,10,13,16,19,22,25,28,31,32,34,37,20,21,1,2,4,7,10,12,13 %N A299714 Irregular triangle read by rows: row n contains numbers k such that 1<=k<=2*n+1 and gcd(n-k, 2*n+1) != 1. %C A299714 Row n contains 2*n+1 - phi(2*n+1) = A053193(n) terms. Row n has just one term (namely n) if 2*n+1 is prime. %C A299714 If we extend each row [r,s, ..., z] to infinite length by appending [j*N*r,j*N*s, ..., j*N*z] for j>=1 and N=2*n+1 we obtain a relation on pairs of positive numbers (u,v). Write R(u,v) if v appears in row u (the relation is 1 on the pair (u,v)). Then R(u,u), R(u,v) ==> R(v, u), R(u,v) ==> R(u, v mod (2*u+1) ), and R(u,v) and v > u ==> R(u-(v-u), v-(v-u)) = R(2*u - v, u). %H A299714 Paolo Xausa, <a href="/A299714/b299714.txt">Table of n, a(n) for n = 1..11968</a> (rows 1..250 of the triangle, flattened) %F A299714 T(n,k) = A300288(n,k) - n. %e A299714 Triangle starts: %e A299714 [01]: [1] %e A299714 [02]: [2] %e A299714 [03]: [3] %e A299714 [04]: [1, 4, 7] %e A299714 [05]: [5] %e A299714 [06]: [6] %e A299714 [07]: [1, 2, 4, 7, 10, 12, 13] %e A299714 [08]: [8] %e A299714 [09]: [9] %e A299714 [10]: [1, 3, 4, 7, 10, 13, 16, 17, 19] %e A299714 [11]: [11] %e A299714 [12]: [2, 7, 12, 17, 22] %e A299714 [13]: [1, 4, 7, 10, 13, 16, 19, 22, 25] %e A299714 [14]: [14] %e A299714 [15]: [15] %e A299714 [16]: [1, 4, 5, 7, 10, 13, 16, 19, 22, 25, 27, 28, 31] %e A299714 [17]: [2, 3, 7, 10, 12, 17, 22, 24, 27, 31, 32] %e A299714 [18]: [18] %e A299714 ... %p A299714 T:= n-> select(k-> igcd(n-k, 2*n+1)<>1, [$1..2*n+1])[]: %p A299714 seq(T(n), n=1..25); # _Alois P. Heinz_, Mar 09 2018 %t A299714 A299714row[n_]:=With[{q=2n+1},If[PrimeQ[q],{n},Select[Range[q],GCD[n-#,q]!=1&]]];Array[A299714row,20] (* _Paolo Xausa_, Nov 10 2023 *) %o A299714 (PARI) is(n,k)= ( gcd(n-k, 2*n+1)!=1 ); %o A299714 for (n=1, 33, for (k=1, 2*n+1, if ( is(n,k), print1(k,", ") ); ); ); %Y A299714 Cf. A300288. %K A299714 nonn,tabf %O A299714 1,2 %A A299714 _Joerg Arndt_, Feb 17 2018