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.

This page as a plain text file.
%I A277915 #29 Jun 10 2018 18:03:24
%S A277915 8,7,12,11,9,15,29,22,13,16,23,43,25,14,20,53,46,49,31,18,21,103,79,
%T A277915 67,58,33,19,24,191,137,106,69,71,41,21,28,47,229,206,131,89,86,44,26,
%U A277915 30,59,94,361,239,157,92,87,50,27,32,311,118,139,382,274,158,115,98,55,28,33
%N 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.
%C A277915 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.
%C A277915 There is no prime in the first column.
%C A277915 Column k>1 contains prime(k)^2.
%H A277915 Alois P. Heinz, <a href="/A277915/b277915.txt">Antidiagonals n = 1..200, flattened</a>
%H A277915 Wikipedia, <a href="https://en.wikipedia.org/wiki/Root_of_unity_modulo_n">Root of unity modulo n</a>
%e A277915 Square array A(n,k) begins:
%e A277915 :  8,  7, 11, 29,  23,  53, 103, 191, ...
%e A277915 : 12,  9, 22, 43,  46,  79, 137, 229, ...
%e A277915 : 15, 13, 25, 49,  67, 106, 206, 361, ...
%e A277915 : 16, 14, 31, 58,  69, 131, 239, 382, ...
%e A277915 : 20, 18, 33, 71,  89, 157, 274, 419, ...
%e A277915 : 21, 19, 41, 86,  92, 158, 289, 457, ...
%e A277915 : 24, 21, 44, 87, 115, 159, 307, 458, ...
%e A277915 : 28, 26, 50, 98, 121, 169, 309, 571, ...
%p A277915 with(numtheory):
%p A277915 A:= proc() local j, l; l:= proc() [] end;
%p A277915       proc(n, k)
%p A277915         while nops(l(k))<n do
%p A277915           for j from 1+`if`(l(k)=[], 0, l(k)[-1]) do
%p A277915             if k=1 and phi(j)> lambda(j) or k>1 and
%p A277915                   irem(phi(j), ithprime(k))=0 then
%p A277915                   l(k):= [l(k)[], j]; break fi
%p A277915           od
%p A277915         od: l(k)[n]
%p A277915       end
%p A277915     end():
%p A277915 seq(seq(A(n, 1+d-n), n=1..d), d=1..15);
%t A277915 A[n_, k_] := Module[{j, l = {}}, While[Length[l]<n, For[j = 1+If[l == {}, 0, l[[-1]]], True, j++, If[k==1 && EulerPhi[j]>CarmichaelLambda[j] || k>1 && Mod[EulerPhi[j], Prime[k]]==0, AppendTo[l, j]; Break[]]]]; l[[n]]];
%t A277915 Table[A[n, 1 + d - n], {d, 1, 15}, {n, 1, d}] // Flatten (* _Jean-François Alcover_, May 29 2018, from Maple *)
%Y A277915 Columns k=1-4 give: A033949, A066498, A066500, A066502.
%Y A277915 Row n=1 gives A066674 for k>1.
%Y A277915 Main diagonal gives A305828.
%Y A277915 Cf. A000010, A000040, A002322.
%K A277915 nonn,look,tabl
%O A277915 1,1
%A A277915 _Alois P. Heinz_, Nov 03 2016