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.

A112484 Array where n-th row contains the primes < n and coprime to n.

Original entry on oeis.org

2, 3, 2, 3, 5, 2, 3, 5, 3, 5, 7, 2, 5, 7, 3, 7, 2, 3, 5, 7, 5, 7, 11, 2, 3, 5, 7, 11, 3, 5, 11, 13, 2, 7, 11, 13, 3, 5, 7, 11, 13, 2, 3, 5, 7, 11, 13, 5, 7, 11, 13, 17, 2, 3, 5, 7, 11, 13, 17, 3, 7, 11, 13, 17, 19, 2, 5, 11, 13, 17, 19, 3, 5, 7, 13, 17, 19, 2, 3, 5, 7, 11, 13, 17, 19, 5, 7, 11, 13
Offset: 3

Views

Author

Leroy Quet, Dec 13 2005

Keywords

Comments

Array's n-th row contains A048865(n) terms.
T(A005408(n),1) = 2; T(n,1) = A053669(n). - Reinhard Zumkeller, Sep 23 2011
These are the primes in row n >= 3 of A038566 (smallest positive restricted residue system modulo n). - Wolfdieter Lang, Jan 18 2017

Examples

			Row 9 is [2, 5, 7], since 2, 5 and 7 are the primes < 9 and coprime to 9.
The irregular triangle begins:
n\k 1 2  3  4  5  6  7  8 ...
3:  2
4:  3
5:  2 3
6:  5
7:  2 3  5
8:  3 5  7
9:  2 5  7
10: 3 7
11: 2 3  5  7
12: 5 7 11
13: 2 3  5  7 11
14: 3 5 11 13
15: 2 7 11 13
16: 3 5  7 11 13
17: 2 3  5  7 11 13
18: 5 7 11 13 17
19: 2 3  5  7 11 13 17
20: 3 7 11 13 17 19
21: 2 5 11 13 17 19
22: 3 5  7 13 17 19
23: 2 3  5  7 11 13 17 19
... - _Wolfdieter Lang_, Jan 18 2017
		

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{n}, n = Length[l] + 1; Return[Append[l, Select[Range[n - 1], PrimeQ[ # ] && Mod[n, # ] > 0 &]]];]; Flatten[Nest[f, {}, 24]] (* Ray Chandler, Dec 26 2005 *)
    Table[Complement[Prime@ Range@ PrimePi@ n, FactorInteger[n][[All, 1]]], {n, 3, 23}] // Flatten (* Michael De Vlieger, Sep 04 2017 *)
  • Python
    from sympy import primerange, gcd
    def a(n): return [i for i in primerange(1, n) if gcd(i, n)==1]
    for n in range(3, 24): print(a(n)) # Indranil Ghosh, Apr 27 2017

Extensions

Extended by Ray Chandler, Dec 26 2005