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.

A277915 A(n,k) is the n-th number m such that a nontrivial prime(k)-th root of unity modulo m exists; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

8, 7, 12, 11, 9, 15, 29, 22, 13, 16, 23, 43, 25, 14, 20, 53, 46, 49, 31, 18, 21, 103, 79, 67, 58, 33, 19, 24, 191, 137, 106, 69, 71, 41, 21, 28, 47, 229, 206, 131, 89, 86, 44, 26, 30, 59, 94, 361, 239, 157, 92, 87, 50, 27, 32, 311, 118, 139, 382, 274, 158, 115, 98, 55, 28, 33
Offset: 1

Views

Author

Alois P. Heinz, Nov 03 2016

Keywords

Comments

The trivial square roots of unity modulo m are {1, m-1} and for an odd prime p the trivial p-th root of unity modulo m is 1.
There is no prime in the first column.
Column k>1 contains prime(k)^2.

Examples

			Square array A(n,k) begins:
:  8,  7, 11, 29,  23,  53, 103, 191, ...
: 12,  9, 22, 43,  46,  79, 137, 229, ...
: 15, 13, 25, 49,  67, 106, 206, 361, ...
: 16, 14, 31, 58,  69, 131, 239, 382, ...
: 20, 18, 33, 71,  89, 157, 274, 419, ...
: 21, 19, 41, 86,  92, 158, 289, 457, ...
: 24, 21, 44, 87, 115, 159, 307, 458, ...
: 28, 26, 50, 98, 121, 169, 309, 571, ...
		

Crossrefs

Columns k=1-4 give: A033949, A066498, A066500, A066502.
Row n=1 gives A066674 for k>1.
Main diagonal gives A305828.

Programs

  • Maple
    with(numtheory):
    A:= proc() local j, l; l:= proc() [] end;
          proc(n, k)
            while nops(l(k)) lambda(j) or k>1 and
                      irem(phi(j), ithprime(k))=0 then
                      l(k):= [l(k)[], j]; break fi
              od
            od: l(k)[n]
          end
        end():
    seq(seq(A(n, 1+d-n), n=1..d), d=1..15);
  • Mathematica
    A[n_, k_] := Module[{j, l = {}}, While[Length[l]CarmichaelLambda[j] || k>1 && Mod[EulerPhi[j], Prime[k]]==0, AppendTo[l, j]; Break[]]]]; l[[n]]];
    Table[A[n, 1 + d - n], {d, 1, 15}, {n, 1, d}] // Flatten (* Jean-François Alcover, May 29 2018, from Maple *)