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

A225653 Numbers n such that A225634(n) = A225644(n).

Original entry on oeis.org

0, 1, 21, 30, 33, 35, 36, 40, 42, 44, 48, 51, 52, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 88, 91, 92, 96
Offset: 0

Views

Author

Antti Karttunen, May 16 2013

Keywords

Comments

Positions of zeros in A225654.

Crossrefs

A225645 Partial sums of A225644.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 16, 19, 23, 27, 32, 37, 43, 48, 53, 58, 64, 69, 76, 82, 89, 95, 102, 109, 116, 123, 131, 139, 147, 156, 165, 174, 184, 193, 203, 212, 221, 231, 241, 251, 261, 271, 282, 294, 305, 316, 328, 340, 351, 362, 375, 387, 399, 411, 423, 435, 447
Offset: 1

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

A225642(a(n)) = n (Note that some terms, like 6 for example, can occur multiple times in A225642.)

Crossrefs

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

A225634 a(n) = Number of distinct values in column n of A225630.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2013

Keywords

Comments

Also, for n>=1, a(n) = the length of n-th row of A225632.
For the positions of records, and other remarks, see comments at A225633.

Crossrefs

Cf. A225635 (partial sums).

Programs

  • Scheme
    (define (A225634 n) (count_number_of_distinct_lcms_of_partitions_until_fixed_point_met n 1))
    (define (count_number_of_distinct_lcms_of_partitions_until_fixed_point_met n initial_value) (let loop ((lcms (list initial_value initial_value))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! lcms (max (car lcms) (lcm (second lcms) p))))) (if (= (car lcms) (second lcms)) (length (cdr lcms)) (loop (cons (car lcms) lcms)))))
    (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))))))))

Formula

a(n) = A225638(n)+A226056(n).
a(n) = A225633(n) + 1.

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

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

A225654 a(n) = the number of surplus elements on the n-th row of A225632 compared to the n-th row of A225642.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 2, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 17 2013

Keywords

Comments

a(n) = how many more iterations is required to reach fixed point A003418(n) with the process described in A225632 and A225642 when starting from partition {1+1+...+1} of n, than when starting from partition {n} of n.
a(0)=0 by convention.

Crossrefs

Cf. A225653 (positions of zeros).

Programs

Formula

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

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.

A225641 Transpose of A225640.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

See comments at A225640.

Crossrefs

Irregular table A225642 gives A225644(n) distinct terms from the beginning of each row.

Programs

Showing 1-10 of 10 results.