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.

Showing 1-2 of 2 results.

A342255 Square array read by ascending antidiagonals: T(n,k) = gcd(k, Phi_k(n)), where Phi_k is the k-th cyclotomic polynomial, n >= 1, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 3, 7, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 2, 1, 2, 5, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 2, 3, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 13
Offset: 1

Views

Author

Jianing Song, Mar 07 2021

Keywords

Comments

T(n,k) is either 1 or a prime.
Since p is a prime factor of Phi_k(n) => either p == 1 (mod k) or p is the largest prime factor of k. As a result, T(n,k) = 1 if and only if all prime factors of Phi_k(n) are congruent to 1 modulo k.

Examples

			Table begins
  n\k |  1  2  3  4  5  6  7  8  9 10 11 12
  ------------------------------------------
    1 |  1  2  3  2  5  1  7  2  3  1 11  1
    2 |  1  1  1  1  1  3  1  1  1  1  1  1
    3 |  1  2  1  2  1  1  1  2  1  1  1  1
    4 |  1  1  3  1  1  1  1  1  3  5  1  1
    5 |  1  2  1  2  1  3  1  2  1  1  1  1
    6 |  1  1  1  1  5  1  1  1  1  1  1  1
    7 |  1  2  3  2  1  1  1  2  3  1  1  1
    8 |  1  1  1  1  1  3  7  1  1  1  1  1
    9 |  1  2  1  2  1  1  1  2  1  5  1  1
   10 |  1  1  3  1  1  1  1  1  3  1  1  1
   11 |  1  2  1  2  5  3  1  2  1  1  1  1
   12 |  1  1  1  1  1  1  1  1  1  1 11  1
		

Crossrefs

Cf. A253240, A323748, A014963 (row 1), A253235 (indices of columns with only 1), A342256 (indices of columns with some elements > 1), A342257 (period of each column, also maximum value of each column), A013595 (coefficients of cyclotomic polynomials).
A342323 is the same table with offset 0.

Programs

  • Mathematica
    A342255[n_, k_] := GCD[k, Cyclotomic[k, n]];
    Table[A342255[n-k+1,k], {n, 15}, {k, n}] (* Paolo Xausa, Feb 09 2024 *)
  • PARI
    T(n,k) = gcd(k, polcyclo(k,n))

Formula

For k > 1, let p be the largest prime factor of k, then T(n,k) = p if p does not divide n and k = p^e*ord(p,n) for some e > 0, where ord(p,n) is the multiplicative order of n modulo p. See my link above for the proof.
T(n,k) = T(n,k*p^a) for all a, where p is the largest prime factor of k.
T(n,k) = Phi_k(n)/A323748(n,k) for n >= 2, k != 2.
For prime p, T(n,p^e) = p if n == 1 (mod p), 1 otherwise.
For odd prime p, T(n,2*p^e) = p if n == -1 (mod p), 1 otherwise.

A342257 Period of the sequence {gcd(n, Phi_n(a)): a in Z}, where Phi_n is the n-th cyclotomic polynomial.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 1, 13, 7, 1, 2, 17, 3, 19, 5, 7, 11, 23, 1, 5, 13, 3, 1, 29, 1, 31, 2, 1, 17, 1, 1, 37, 19, 13, 1, 41, 7, 43, 1, 1, 23, 47, 1, 7, 5, 1, 13, 53, 3, 11, 1, 19, 29, 59, 1, 61, 31, 1, 2, 1, 1, 67, 17, 1, 1, 71, 1, 73, 37, 1
Offset: 1

Views

Author

Jianing Song, Mar 07 2021

Keywords

Comments

a(n) is the period of the n-th column of A342255. See A342255 for more information.
Also a(n) is the maximum value of the n-th column of A342255. - Jianing Song, Aug 09 2022

Examples

			gcd(6, Phi_6(a)) = gcd(6, a^2-a+1) = 3 for a == 2 (mod 3), 1 otherwise, so {gcd(6, Phi_6(a)): a in Z} has period 3, hence a(6) = 3.
gcd(12, Phi_12(a)) = gcd(12, a^4-a^2+1) = 1 for all n, so {gcd(12, Phi_12(a)): a in Z} has period 1, hence a(12) = 1.
		

Crossrefs

Cf. A342255, A253235 (indices of 1), A342256 (indices of terms other than 1), A006530, A013595 (coefficients of cyclotomic polynomials).

Programs

  • PARI
    a(n) = if(n>1, my(L=factor(n), d=omega(n), p=L[d, 1]); if((p-1)%(n/p^L[d, 2])==0, p, 1), 1)

Formula

a(n) is the largest prime factor of n if n is in A342256, 1 otherwise.
Showing 1-2 of 2 results.