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.

A333429 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.

Original entry on oeis.org

1, 1, 2, 1, 3, 0, 1, 2, 9, 0, 1, 5, 10, 27, 0, 1, 2, 25, 50, 81, 0, 1, 7, 3, 125, 250, 171, 0, 1, 2, 49, 9, 205, 1250, 243, 0, 1, 3, 10, 203, 21, 625, 5050, 513, 0, 1, 2, 9, 50, 343, 26, 1025, 6250, 729, 0, 1, 11, 5, 27, 250, 1379, 27, 2525, 11810, 1539, 0
Offset: 1

Views

Author

Alois P. Heinz, Mar 20 2020

Keywords

Examples

			Square array A(n,k) begins:
  1,    1,     1,    1,   1,    1,     1,   1,    1,     1, ...
  2,    3,     2,    5,   2,    7,     2,   3,    2,    11, ...
  0,    9,    10,   25,   3,   49,    10,   9,    5,   121, ...
  0,   27,    50,  125,   9,  203,    50,  27,   25,   253, ...
  0,   81,   250,  205,  21,  343,   250,  57,   82,  1331, ...
  0,  171,  1250,  625,  26, 1379,  1250,  81,  125,  2783, ...
  0,  243,  5050, 1025,  27, 1421,  2810, 171,  625,  5819, ...
  0,  513,  6250, 2525,  63, 2401,  5050, 243, 2525, 11891, ...
  0,  729, 11810, 3125,  81, 5887,  6250, 513, 3125, 14641, ...
  0, 1539, 25250, 5125, 147, 9653, 14050, 729, 3362, 30613, ...
		

Crossrefs

Rows n=1-2 give: A000012, A092067.
Main diagonal gives A333430.
Cf. A333432.

Programs

  • Maple
    A:= proc() local h, p; p:= proc() [1] end;
          proc(n, k) if k=1 then `if`(n<3, n, 0) else
            while nops(p(k)) 0 do od;
              p(k):= [p(k)[], h]
            od; p(k)[n] fi
          end
        end():
    seq(seq(A(n, 1+d-n), n=1..d), d=1..12);
  • Mathematica
    dmax = 12;
    mmax = 2^(dmax+3);
    col[k_] := col[k] = Select[Range[mmax], Divisible[k^#+1, #]&];
    A[n_, k_] := If[n>2 && k==1, 0, col[k][[n]]];
    Table[A[n, d-n+1], {d, 1, dmax}, {n, 1, d}] // Flatten (* Jean-François Alcover, Jan 05 2021 *)