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

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.

A225644 a(n) = number of distinct values in column n of A225640.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

For the positions of records, and other remarks, see comments at A225643.

Crossrefs

Cf. A225645 (partial sums).

Programs

  • Scheme
    (define (A225644 n) (count_number_of_distinct_lcms_of_partitions_until_fixed_point_met n n))
    (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) = A225643(n) + 1.
a(n) = A225639(n) + A226056(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).

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

A225650 The greatest common divisor of Landau g(n) and n.

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 6, 1, 1, 1, 10, 1, 12, 1, 14, 15, 4, 1, 6, 1, 20, 21, 2, 1, 24, 5, 2, 1, 14, 1, 30, 1, 4, 3, 2, 35, 36, 1, 2, 39, 40, 1, 42, 1, 44, 15, 2, 1, 24, 7, 10, 3, 52, 1, 18, 55, 56, 3, 2, 1, 60, 1, 2, 21, 8, 65, 66, 1, 4, 3, 70, 1, 72, 1, 2, 15, 76, 77, 78, 1
Offset: 0

Views

Author

Antti Karttunen, May 11 2013

Keywords

Crossrefs

A225648 gives the position of ones, and likewise A225651 gives the positions of fixed points, that is, a(A225651(n)) = A225651(n) for all n.

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = Module[{p}, p = If[i < 1, 1, Prime[i]]; If[n == 0 || i < 1, 1, Max[b[n, i - 1], Table[p^j*b[n - p^j, i - 1], {j, 1, Log[p, n] // Floor}]]]]; g[n_] := b[n, If[n < 8, 3, PrimePi[Ceiling[1.328*Sqrt[n* Log[n] // Floor]]]]]; a[n_] := GCD[n, g[n]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 02 2016, after Alois P. Heinz *)
  • Scheme
    (define (A225650 n) (gcd (A000793 n) n))
    ;; Scheme-code for A000793 can be found in the Program section of that entry.

Formula

a(n) = gcd(n, A000793(n)).

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

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 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, 2, 3, 5, 9, 11, 13, 19, 27, 31, 38, 43, 47, 61, 73, 81, ... 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

Formula

a(n) = A225634(n) - 1.
Showing 1-7 of 7 results.