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.

A096861 Function A062401(x) = phi(sigma(x)) = f(x) is iterated. Starting with n, a(n) is the largest term arising in trajectory.

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 7, 8, 12, 10, 11, 12, 13, 14, 15, 30, 17, 30, 19, 20, 30, 22, 23, 30, 30, 26, 30, 30, 29, 30, 31, 96, 33, 34, 35, 96, 37, 38, 39, 40, 41, 96, 43, 44, 45, 46, 47, 60, 96, 60, 51, 96, 53, 96, 55, 96, 96, 58, 59, 60, 61, 96, 63, 126, 65, 66, 96, 96, 96, 70, 71, 96
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=255: list={255,144,360,288,[432,480],432,...}, a(255)=480, a recurrent term;
n=247: list={247,96,72,96,...}, a(247)=247, a transient term, here the initial value.
		

Crossrefs

Programs

  • Mathematica
    gf[x_] :=DivisorSigma[1, EulerPhi[x]] itef[x_, len_] :=NestList[fs, x, len] Table[Max[itef[w, 20]], {w, 1, 256}]
  • Scheme
    (define (A096861 n) (let loop ((visited (list n)) (m n)) (let ((next (A062401 (car visited)))) (cond ((member next visited) m) (else (loop (cons next visited) (max m next))))))) ;; Antti Karttunen, Nov 18 2017

A096866 Function A062402(x) = sigma(phi(x)) is iterated. Starting with n, a(n) is the smallest term arising in trajectory, either in transient or in terminal cycle.

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 7, 7, 7, 7, 7, 13, 7, 15, 15, 17, 7, 19, 15, 21, 7, 23, 15, 25, 26, 27, 28, 29, 15, 31, 31, 28, 31, 31, 28, 37, 31, 31, 31, 31, 28, 43, 28, 31, 28, 31, 31, 49, 28, 51, 31, 53, 31, 31, 31, 57, 31, 31, 31, 61, 31, 63, 63, 65, 28, 67, 63, 31, 31, 71, 31, 73, 74
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=240: list={240,127,312,[252,195],252,...}, a(240)=127, a transient;
n=254: list={254,312,[252,195],252,...}, a(254)=195, a recurrent term.
		

Crossrefs

Cf. A062401, A062402, A096862, A096863, A096864 (largest term), A096993.
Cf. also A096865.

Programs

  • Mathematica
    gf[x_] :=DivisorSigma[1, EulerPhi[x]] gite[x_, hos_] :=NestList[gf, x, hos] Table[Min[gite[w, 20]], {w, 1, 256}]
  • Scheme
    (define (A096866 n) (let loop ((visited (list n)) (m n)) (let ((next (A062402 (car visited)))) (cond ((member next visited) m) (else (loop (cons next visited) (min m next))))))) ;; Antti Karttunen, Nov 18 2017

A096993 Function A062402(x) = sigma(phi(x)) is iterated with initial value=n. a(n) is the length of cycle into which the trajectory merges.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 3, 2, 3, 1, 1, 2, 1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 2, 3, 3, 3, 3, 1, 2, 1, 3, 1, 3, 3, 2, 1, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 2, 2, 1, 2, 2, 3, 3, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Labos Elemer, Jul 19 2004

Keywords

Comments

No 5's present among the first 16384 terms, but they should exist as A095955 has them too. - Antti Karttunen, Dec 04 2017

Crossrefs

Programs

  • Scheme
    (define (A096993 n) (if (= 1 n) n (let loop ((visited (list n)) (i 1)) (let ((next (A062402 (car visited)))) (cond ((member next visited) => (lambda (prepath) (+ 1 (- i (length prepath))))) (else (loop (cons next visited) (+ 1 i)))))))) ;; Antti Karttunen, Dec 04 2017

A066437 a(n) = max_{k} {T(n,k)} where T(n,k) is the "phi/sigma tug-of-war sequence with seed n" defined by T(n,1) = phi(n), T(n,2) = sigma(phi(n)), T(n,3) = phi(sigma(phi(n))), ..., T(n,k) = phi(T(n,k-1)) if k is odd and = sigma(T(n,k-1)) if k is even.

Original entry on oeis.org

1, 1, 3, 3, 12, 3, 12, 12, 12, 12, 18, 12, 28, 12, 15, 15, 72, 12, 72, 15, 28, 18, 36, 15, 42, 28, 72, 28, 72, 15, 72, 72, 42, 72, 72, 28, 252, 72, 72, 72, 90, 28, 252, 42, 72, 36, 72, 72, 252, 42, 252, 72, 252, 72, 90, 72, 252, 72, 90, 72, 168, 72, 252, 252, 168, 42
Offset: 1

Views

Author

Joseph L. Pe, Jan 08 2002

Keywords

Comments

Conjecture: a(n) is always finite; i.e. the sequence {T(n,k)} is eventually periodic for every n.
a(n) >= sigma(phi(n)) >= phi(n); since phi(n) -> infinity with n, so does a(n).
Sequence is otherwise like A096864, except here the initial value n where the iteration is started from is ignored. - Antti Karttunen, Dec 06 2017

Examples

			For n=11, the sequence is 11, 10, 18, 6, 12, 4, 7, 6, 12, ..., whose maximum value is 18. Hence a(11) = 18.
		

Crossrefs

Programs

  • Mathematica
    a[ n_ ] := For[ m=n; max=0; seq={}, True, AppendTo[ seq, m ], If[ (m=DivisorSigma[ 1, EulerPhi[ m ] ])>max, max=m ]; If[ MemberQ[ seq, m ], Return[ max ] ] ]
  • Scheme
    (define (A066437 n) (let loop ((visited (list n)) (i 1) (m 1)) (let ((next ((if (odd? i) A000010 A000203) (car visited)))) (cond ((member next (reverse visited)) => (lambda (start_of_cyclic_part) (cond ((even? (length start_of_cyclic_part)) (max m next)) (else (loop (cons next visited) (+ 1 i) (max m next)))))) (else (loop (cons next visited) (+ 1 i) (max m next))))))) ;; Antti Karttunen, Dec 06 2017

Formula

a(n) = A096864(A062402(n)). - Antti Karttunen, Dec 06 2017

Extensions

Edited by Dean Hickerson, Jan 18 2002
Showing 1-4 of 4 results.