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.

A333432 A(n,k) is the n-th number m that divides k^m - 1 (or 0 if m does not exist); square array A(n,k), n>=1, k>=1, read by antidiagonals.

This page as a plain text file.
%I A333432 #35 Nov 01 2020 06:07:32
%S A333432 1,1,2,1,0,3,1,2,0,4,1,3,4,0,5,1,2,9,8,0,6,1,5,4,21,16,0,7,1,2,25,6,
%T A333432 27,20,0,8,1,7,3,125,8,63,32,0,9,1,2,49,4,625,12,81,40,0,10,1,3,4,343,
%U A333432 6,1555,16,147,64,0,11,1,2,9,8,889,8,3125,18,171,80,0,12
%N A333432 A(n,k) is the n-th number m that divides k^m - 1 (or 0 if m does not exist); square array A(n,k), n>=1, k>=1, read by antidiagonals.
%H A333432 Seiichi Manyama, <a href="/A333432/b333432.txt">Antidiagonals n = 1..25, flattened</a>
%H A333432 OEIS Wiki, <a href="/wiki/2^n mod n">2^n mod n</a>
%e A333432 Square array A(n,k) begins:
%e A333432   1, 1,  1,   1,  1,     1,  1,     1,  1, ...
%e A333432   2, 0,  2,   3,  2,     5,  2,     7,  2, ...
%e A333432   3, 0,  4,   9,  4,    25,  3,    49,  4, ...
%e A333432   4, 0,  8,  21,  6,   125,  4,   343,  8, ...
%e A333432   5, 0, 16,  27,  8,   625,  6,   889, 10, ...
%e A333432   6, 0, 20,  63, 12,  1555,  8,  2359, 16, ...
%e A333432   7, 0, 32,  81, 16,  3125,  9,  2401, 20, ...
%e A333432   8, 0, 40, 147, 18,  7775, 12,  6223, 32, ...
%e A333432   9, 0, 64, 171, 24, 15625, 16, 16513, 40, ...
%p A333432 A:= proc() local h, p; p:= proc() [1] end;
%p A333432       proc(n, k) if k=2 then `if`(n=1, 1, 0) else
%p A333432         while nops(p(k))<n do for h from 1+p(k)[-1]
%p A333432           while k&^h mod h <> 1 do od;
%p A333432           p(k):= [p(k)[], h]
%p A333432         od; p(k)[n] fi
%p A333432       end
%p A333432     end():
%p A333432 seq(seq(A(n, 1+d-n), n=1..d), d=1..12);  # _Alois P. Heinz_, Mar 24 2020
%t A333432 A[n_, k_] := Module[{h, p}, p[_] = {1}; If[k == 2, If[n == 1, 1, 0], While[ Length[p[k]] < n, For[h = 1 + p[k][[-1]], Mod[k^h, h] != 1, h++]; p[k] = Append[p[k], h]]; p[k][[n]]]];
%t A333432 Table[A[n, 1+d-n], {d, 1, 12}, {n, 1, d}] // Flatten (* _Jean-François Alcover_, Nov 01 2020, after _Alois P. Heinz_ *)
%Y A333432 Columns k=1-20 give: A000027, A063524, A067945, A014945, A067946, A014946, A067947, A014949, A068382, A014950, A068383, A014951, A116621, A177805, A014957, A177807, A128358, A333506, A128360.
%Y A333432 Main diagonal gives A333433.
%Y A333432 Cf. A333429, A333500.
%K A333432 nonn,tabl
%O A333432 1,3
%A A333432 _Seiichi Manyama_, Mar 21 2020