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 A322937 #22 Apr 02 2019 17:53:32 %S A322937 0,0,0,0,3,0,5,3,5,5,7,7,3,7,5,7,5,7,11,3,5,11,11,13,7,11,13,3,5,7,11, %T A322937 13,5,7,11,13,5,7,11,13,17,3,7,11,13,17,11,13,17,19,5,13,17,19,3,5,7, %U A322937 13,17,19,5,7,11,13,17,19,7,11,13,17,19,23 %N A322937 Triangular array in which the n-th row lists the primes strongly prime to n (in ascending order). For the empty rows n = 1, 2, 3, 4 and 6 we set by convention 0. %C A322937 A number k is strongly prime to n if and only if k <= n is prime to n and k does not divide n-1. See the link to 'Strong Coprimality'. (Our terminology follows the plea of Knuth, Graham and Patashnik in Concrete Mathematics, p. 115.) %H A322937 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/StrongCoprimality">Strong Coprimality</a> %e A322937 The length of row n is A181834(n). The triangular array starts: %e A322937 [1] {} %e A322937 [2] {} %e A322937 [3] {} %e A322937 [4] {} %e A322937 [5] {3} %e A322937 [6] {} %e A322937 [7] {5} %e A322937 [8] {3, 5} %e A322937 [9] {5, 7} %e A322937 [10] {7} %e A322937 [11] {3, 7} %e A322937 [12] {5, 7} %e A322937 [13] {5, 7, 11} %e A322937 [14] {3, 5, 11} %e A322937 [15] {11, 13} %e A322937 [16] {7, 11, 13} %e A322937 [17] {3, 5, 7, 11, 13} %e A322937 [18] {5, 7, 11, 13} %e A322937 [19] {5, 7, 11, 13, 17} %e A322937 [20] {3, 7, 11, 13, 17} %p A322937 Primes := n -> select(isprime, {$1..n}): %p A322937 StrongCoprimes := n -> select(k->igcd(k, n)=1, {$1..n}) minus numtheory:-divisors(n-1): %p A322937 StrongCoprimePrimes := n -> Primes(n) intersect StrongCoprimes(n): %p A322937 A322937row := proc(n) if n in {1, 2, 3, 4, 6} then return 0 else op(StrongCoprimePrimes(n)) fi end: %p A322937 seq(A322937row(n), n=1..25); %t A322937 Table[Select[Prime@ Range@ PrimePi@ n, And[GCD[#, n] == 1, Mod[n - 1, #] != 0] &] /. {} -> {0}, {n, 25}] // Flatten (* _Michael De Vlieger_, Apr 01 2019 *) %o A322937 (Sage) %o A322937 def primes_primeto(n): %o A322937 return [p for p in prime_range(n) if gcd(p, n) == 1] %o A322937 def primes_strongly_primeto(n): %o A322937 return [p for p in set(primes_primeto(n)) - set((n-1).divisors())] %o A322937 def A322937row(n): %o A322937 if n in [1, 2, 3, 4, 6]: return [0] %o A322937 return sorted(primes_strongly_primeto(n)) %o A322937 for n in (1..25): print(A322937row(n)) %Y A322937 Cf. A000010, A038566, A181831, A181832, A181833, A181834, A181835, A181836, A322936. %K A322937 nonn,tabf %O A322937 1,5 %A A322937 _Peter Luschny_, Apr 01 2019