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

A225639 a(n) is the index of the first row in column n of A225640 where A226055(n) occurs.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 2, 2, 1, 4, 4, 3, 2, 4, 2, 4, 5, 2, 2, 5, 5, 6, 6, 4, 2, 8, 4, 7, 6, 8, 6, 6, 4, 9, 6, 9, 3, 4, 3, 8, 7, 7, 3, 9, 9, 10, 8, 8, 3, 10, 10, 10, 9, 10, 4, 7, 4, 12, 12, 11, 12, 9, 5, 10, 12, 9, 6, 6, 6, 13, 12, 12, 12, 13, 6, 14, 13
Offset: 0

Views

Author

Antti Karttunen, May 21 2013

Keywords

Comments

Consider an algorithm which finds a maximal value lcm(p1,p2,...,pk,prevmax) among all partitions {p1+p2+...+pk} of n, where the "seed number" prevmax is a maximal value from the previous iteration.
a(n) gives the number of such iterations needed when starting from the initial seed value n, for the process to reach the first identical value (A226055(n)) that is eventually produced when the same algorithm is started with the initial seed value of 1.
The records occur at positions 0, 5, 11, 14, 21, 26, 30, 38, 50, 62, 74, 80, ...

Examples

			Looking at A225632 and A225642, which are just arrays A225630 and A225640 transposed and eventually repeating values removed, we see that:
row 11 of A225632 is 1, 30, 420, 4620, 13860, 27720;
row 11 of A225642 is 11, 330, 4620, 13860, 27720;
their first common term, 4620 (= A226055(11)), occurs as two positions after the initial 11 of that row in A225642, thus a(11)=2.
Equivalently, 4620 occurs as the element A(2,11) of array A225640.
		

Programs

  • Scheme
    (define (A225639 n) (if (zero? n) n (let ((fun1 (lambda (seed) (let ((max1 (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! max1 (max (car max1) (lcm seed p))))) (car max1)))) (fun2 (lambda (seed) (let ((max2 (list 0))) (fold_over_partitions_of n (max 1 n) lcm (lambda (p) (set-car! max2 (max (car max2) (lcm seed p))))) (car max2))))) (steps-to-convergence-nondecreasing fun2 fun1 n 1))))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
    (define (steps-to-convergence-nondecreasing fun1 fun2 initval1 initval2) (let loop ((steps 0) (a1 initval1) (a2 initval2)) (cond ((equal? a1 a2) steps) ((< a1 a2) (loop (+ steps 1) (fun1 a1) a2)) (else (loop steps a1 (fun2 a2))))))

Formula

a(n) = A225638(n) - A225654(n) = A225644(n) - A226056(n). (But please see the given Scheme-program for how this sequence can actually be computed.)
A226055(n) = A225640(a(n),k) = A225630(A225638(n),k).

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

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 1, 4, 12, 1, 6, 30, 60, 1, 6, 30, 60, 1, 12, 84, 420, 1, 15, 120, 840, 1, 20, 180, 1260, 2520, 1, 30, 210, 840, 2520, 1, 30, 420, 4620, 13860, 27720, 1, 60, 660, 4620, 13860, 27720, 1, 60, 780, 8580, 60060, 180180, 360360
Offset: 1

Views

Author

Antti Karttunen, May 13 2013

Keywords

Comments

The leftmost column of table (the initial term of each row, T(n,1)) is 1, corresponding to lcm(1,1,...,1) computed from the {1+1+...+1} partition of n, after which, on the same row, each further term T(n,i) is computed by finding such a partition [p1,p2,...,pk] of n so that value of lcm(T(n,i-1), p1,p2,...,pk) 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).

Examples

			The first fifteen rows of table are:
  1;
  1,   2;
  1,   3,    6;
  1,   4,   12;
  1,   6,   30,    60;
  1,   6,   30,    60;
  1,  12,   84,   420;
  1,  15,  120,   840;
  1,  20,  180,  1260,   2520;
  1,  30,  210,   840,   2520;
  1,  30,  420,  4620,  13860,  27720;
  1,  60,  660,  4620,  13860,  27720;
  1,  60,  780,  8580,  60060, 180180, 360360;
  1,  84, 1260, 16380, 180180, 360360;
  1, 105, 4620, 60060, 180180, 360360;
		

Crossrefs

Cf. A225634 (length of n-th row), A000793 (n>=2 gives the second column).
Cf. A225629 (second largest/rightmost term of n-th row).
Cf. A003418 (largest/rightmost term of n-th row).
Cf. A225642 (row n starts from n instead of 1).
Cf. A226055 (the first term common with A225642 on the n-th row).
Cf. A225638 (distance to that first common term from the beginning of the row n).
Cf. A226056 (number of trailing terms common with A225642 on the n-th row).

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:
    T:= proc(n) option remember; local d, h, l, ll;
          l:= b(n$2); ll:= NULL; d:=1; h:=0;
          while d<>h do ll:= ll, d; h:= d;
            d:= max(seq(ilcm(h, i), i=l))
          od; ll
        end:
    seq(T(n), n=1..20);  # Alois P. Heinz, May 29 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}]]]; T[n_] := T[n] = Module[{d, h, l, ll}, l=b[n, n]; ll={}; d=1; h=0; While[d != h, AppendTo[ll, d]; h=d; d = Max[ Table[LCM[h, i], {i, l}]]]; ll]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)

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 *)

A226056 a(n) = Number of common trailing terms on the row n of tables A225632 and A225642.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 5, 1, 1, 2, 4, 1, 5, 2, 2, 4, 5, 2, 2, 1, 2, 4, 6, 1, 5, 2, 4, 1, 4, 3, 5, 1, 4, 1, 7, 6, 8, 4, 4, 4, 9, 3, 2, 1, 5, 4, 9, 2, 2, 2, 3, 2, 8, 6, 9, 1, 1, 1, 2, 4, 8, 3, 1, 4, 7, 8, 8, 2, 3, 3, 3, 1, 8, 1, 2, 3, 10, 10
Offset: 0

Views

Author

Antti Karttunen, May 24 2013

Keywords

Comments

The positions n, in which a(n)=1: 0, 1, 2, 14, 15, 18, 26, 30, 34, 38, 40, 50, 62, 63, 64, 69, 78, 80, ...
By convention, a(0)=1 as this applies also to the tables A225630 and A225640, whose columns start from zero.
In other words, a(n) = 1 + distance from the first common term on column n (A226055(n)) of tables A225630 and A225640 to the respective fixed point, A003418(n).

Examples

			Row 7 of A225632 is: 1, 12, 84, 420;
Row 7 of A225642 is: 7, 84, 420;
the last two terms (84 and 420) are common to them, thus a(7)=2.
Row 14 of A225632 is: 1, 84, 1260, 16380, 180180, 360360;
Row 14 of A225642 is: 14, 630, 8190, 90090, 360360;
they have no common term until as the last term of those rows (which is A003418(14)=360360), thus a(14)=1.
		

Crossrefs

Programs

Formula

a(n) = A225634(n)-A225638(n) = A225644(n)-A225639(n).

A225638 a(n) is the row index where the first term in column n of A225630 equivalent to some term in column n of A225640 is found from.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 5, 5, 4, 3, 6, 3, 5, 5, 3, 3, 6, 6, 7, 7, 5, 3, 8, 5, 8, 6, 9, 6, 6, 5, 10, 7, 9, 4, 4, 4, 8, 8, 8, 4, 9, 11, 12, 8, 8, 4, 11, 11, 10, 9, 10, 5, 7, 5, 12, 12, 13, 12, 9, 6, 10, 12, 9, 7, 6, 7, 13, 12, 12, 12, 13, 7, 14, 14
Offset: 0

Views

Author

Antti Karttunen, May 20 2013

Keywords

Comments

Consider an algorithm which finds a maximum value lcm(p1,p2,...,pk,prevmax) among all partitions {p1+p2+...+pk} of n, where the "seed number" prevmax is such a maximum value from the previous iteration.
a(n) tells the number of such iterations needed, when starting from the initial seed value 1, for the process to reach the first identical value (A226055(n)) that is eventually produced when the same algorithm is started with the initial seed value of n.

Examples

			Looking at A225632 and A225642, which are just arrays A225630 and A225640 transposed and repeating values removed, we see that:
row 11 of A225632 is 1, 30, 420, 4620, 13860, 27720;
row 11 of A225642 is 11, 330, 4620, 13860, 27720;
their first common term, 4620 (= A226055(11)), occurs as three positions after the initial 1 of that row in A225632, thus a(11)=3.
Equivalently, 4620 occurs as the element A(3,11) of array A225630.
		

Programs

  • Scheme
    (define (A225638 n) (if (zero? n) n (let ((fun1 (lambda (seed) (let ((max1 (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! max1 (max (car max1) (lcm seed p))))) (car max1)))) (fun2 (lambda (seed) (let ((max2 (list 0))) (fold_over_partitions_of n (max 1 n) lcm (lambda (p) (set-car! max2 (max (car max2) (lcm seed p))))) (car max2))))) (steps-to-convergence-nondecreasing fun1 fun2 1 n))))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
    (define (steps-to-convergence-nondecreasing fun1 fun2 initval1 initval2) (let loop ((steps 0) (a1 initval1) (a2 initval2)) (cond ((equal? a1 a2) steps) ((< a1 a2) (loop (+ steps 1) (fun1 a1) a2)) (else (loop steps a1 (fun2 a2))))))

Formula

a(n) = A225639(n) + A225654(n) = A225634(n) - A226056(n). (But please see the Scheme-program how this sequence actually can be computed.)
A226055(n) = A225630(a(n),k) = A225640(A225639(n),k).

A225643 Number of steps to reach a fixed point (A003418(n)), when starting from partition {n} of n and continuing with the process described in A225642.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 4, 4, 4, 5, 4, 6, 5, 6, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 8, 9, 8, 8, 9, 9, 9, 9, 9, 10, 11, 10, 10, 11, 11, 10, 10, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 11, 13, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14
Offset: 0

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

a(0)=0, as its only partition is an empty partition {}, and by convention lcm()=1, thus it takes no steps to reach from 1 to A003418(0)=1.
The records occur at positions 0, 3, 5, 9, 11, 13, 19, 27, 30, 33, 43, 44, 51, 65, 74, 82, ... and they seem to occur in order, i.e., as A001477. Thus the record-positions probably also give the left inverse function for this sequence. It also seems that each integer occurs only finite times in this sequence, so there should be a right inverse function as well.

Crossrefs

Programs

Formula

a(n) = A225644(n) - 1.
Showing 1-6 of 6 results.