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-4 of 4 results.

A225640 Array A(n,k) of iterated Landau-like functions, where on the row n=0 A(0,0)=1 and A(0,k>=1)=k, and the successive rows A(n,k) give a maximum value lcm(p1,p2,...,pj,A(n-1,k)) for all partitions {p1+p2+...+pj} of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 6, 2, 1, 1, 5, 12, 6, 2, 1, 1, 6, 30, 12, 6, 2, 1, 1, 7, 30, 60, 12, 6, 2, 1, 1, 8, 84, 60, 60, 12, 6, 2, 1, 1, 9, 120, 420, 60, 60, 12, 6, 2, 1, 1, 10, 180, 840, 420, 60, 60, 12, 6, 2, 1, 1, 11, 210, 1260, 840, 420, 60, 60, 12, 6, 2, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 14 2013

Keywords

Comments

In this array the maximization of LCM starts from partition {k} of k, instead of partition {1+1+...+1} as in A225630.

Examples

			The top-left corner of the array:
1, 1, 2, 3,  4,  5,  6,   7,   8,   9,    10,    11,    12, ...
1, 1, 2, 6, 12, 30, 30,  84, 120,  180,  210,   330,   420, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 1260,  840,  4620,  4620, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 13860, 13860, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, ...
...
		

Crossrefs

Transpose: A225641.
Cf. A225642, A225644, A001477 (row 0), A225646 (row 1).
Rows converge towards A003418 (main diagonal of this array).
See A225630 for a variant employing a similar process, but which uses 1 in column n as the initial seed for that column, instead of n.

Programs

  • Scheme
    (define (A225640 n) (A225640bi (A025581 n) (A002262 n)))
    (define (A225640bi col row) (let ((maxlcm (list 0))) (let loop ((prevmaxlcm (max 1 col)) (stepsleft row)) (if (zero? stepsleft) prevmaxlcm (begin (gen_partitions col (lambda (p) (set-car! maxlcm (max (car maxlcm) (apply lcm (cons prevmaxlcm p)))))) (loop (car maxlcm) (- stepsleft 1)))))))
    (define (gen_partitions m colfun) (let recurse ((m m) (b m) (n 0) (partition (list))) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (cons i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))

A225642 Irregular table read by rows: n-th row gives distinct values of successively iterated Landau-like functions for n, starting with the initial value n.

Original entry on oeis.org

1, 2, 3, 6, 4, 12, 5, 30, 60, 6, 30, 60, 7, 84, 420, 8, 120, 840, 9, 180, 1260, 2520, 10, 210, 840, 2520, 11, 330, 4620, 13860, 27720, 12, 420, 4620, 13860, 27720, 13, 780, 8580, 60060, 180180, 360360, 14, 630, 8190, 90090, 360360, 15, 840, 10920, 120120, 360360
Offset: 1

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

The leftmost column of table (the initial term of each row, T(n,1)) is n, corresponding to lcm(n) computed from the singular {n} partition of n, after which, on the same row, each further term T(n,i) is computed by finding such a partition {p_1 + p_2 + ... + p_k} of n so that value of lcm(T(n, i-1), p_1, p_2, ..., p_k) is maximized, until finally A003418(n) is reached, which will be listed as the last term of row n (as the result would not change after that, if we continued the same process).
Of possible interest: which numbers occur only once in this table, and which occur multiple times? And how many times, if each number occurs only a finite number of times?
Each number occurs a finite number of times: rows are increasing, first column is increasing, so n will occur last in row n, leftmost column. Primes (and other numbers too) occur once. - Alois P. Heinz, May 25 2013

Examples

			The first fifteen rows of table are:
   1;
   2;
   3,   6;
   4,  12;
   5,  30,    60;
   6,  30,    60;
   7,  84,   420;
   8, 120,   840;
   9, 180,  1260,   2520;
  10, 210,   840,   2520;
  11, 330,  4620,  13860,  27720;
  12, 420,  4620,  13860,  27720;
  13, 780,  8580,  60060, 180180, 360360;
  14, 630,  8190,  90090, 360360;
  15, 840, 10920, 120120, 360360;
		

Crossrefs

Cf. A225644 (length of n-th row), A225646 (for n >= 3, second term of n-th row).
Cf. A003418 (largest and rightmost term of n-th row).
Cf. A225632 (each row starts with 1 instead of n).
Cf. A226055 (the first common term with A225632 on the n-th row).
Cf. A225639 (distance to that first common term).
Cf. A226056 (number of trailing common terms with A225632 on the n-th row).

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i < 1, {}, Table[Map[Function[{x}, LCM[x, If[j == 0, 1, i]]], b[n - i * j, i - 1]], {j, 0, n/i}]]]; T[n_] := T[n] = Module[{d, h, t, lis}, t = b[n, n]; lis = {}; d = n; h = 0; While[d != h, AppendTo[lis, d]; h = d; d = Max[Table[LCM[h, i], {i, t}]]]; lis]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Mar 02 2016, after Alois P. Heinz *)

A225652 a(n) = (1/n) * lcm(n,p1,p2,...,pk) for that partition of n which maximizes this value among all partitions [p1,p2,...,pk] of n.

Original entry on oeis.org

1, 1, 2, 3, 6, 5, 12, 15, 20, 21, 30, 35, 60, 45, 56, 105, 210, 77, 420, 99, 220, 315, 840, 385, 924, 1155, 1540, 585, 2520, 364, 4620, 3465, 3640, 4620, 3432, 5005, 13860, 8190, 6160, 9009, 30030, 4290, 60060, 9945, 12376, 45045, 120120, 17017, 51480, 36036
Offset: 1

Views

Author

Antti Karttunen, May 15 2013

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {1},
          `if`(i<1, {}, {seq(map(x->ilcm(x, `if`(j=0, 1, i)),
           b(n-i*j, i-1))[], j=0..n/i)}))
        end:
    a:= n-> max(seq(ilcm(n, i), i=b(n$2)))/n:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 25 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, {1}, If[i<1, {}, Table[Map[Function[{x}, LCM[x, If[j==0, 1, i]]], b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := Max[Table[LCM[n, i], {i, b[n, n]}]]/n; Table[Print["a(", n, ") = ", an = a[n]]; an, {n, 1, 50}] (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)
  • Scheme
    (define (A225652 n) (/ (A225646 n) (max 1 n)))

Formula

a(n) = A225646(n)/n.

A225655 a(n) = largest LCM of partitions of n divisible by n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 30, 11, 60, 13, 84, 105, 16, 17, 180, 19, 420, 420, 330, 23, 840, 25, 780, 27, 1540, 29, 4620, 31, 32, 4620, 3570, 9240, 13860, 37, 7980, 16380, 27720, 41, 32760, 43, 60060, 45045, 19320, 47, 55440, 49, 23100, 157080, 180180, 53
Offset: 1

Views

Author

Antti Karttunen, May 19 2013

Keywords

Comments

a(n) = lcm(p1,p2,...,pk) for that partition of n for which the LCM is a multiple of n, and which maximizes this value among all such partitions [p1,p2,...,pk] of n.

Crossrefs

For all n, a(A225651(n)) = A000793(A225651(n)).
A225657 lists the values of n for which a(n) = n.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {1},
          `if`(i<1, {}, {seq(map(x->ilcm(x, `if`(j=0, 1, i)),
           b(n-i*j, i-1))[], j=0..n/i)}))
        end:
    a:= n-> max(select(x-> irem(x, n)=0, b(n$2))[]):
    seq(a(n), n=1..50);  # Alois P. Heinz, May 26 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, {1}, If[i<1, {}, Union @ Flatten @ Table[ Map[ Function[{x}, LCM[x, If[j==0, 1, i]]], b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := Max[Select[b[n, n], Mod[#, n]==0&]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)
Showing 1-4 of 4 results.