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.

A096859 Function A062401(x) = phi(sigma(x)) = f(x) is iterated. Starting with n, a(n) is the count of distinct terms arising in trajectory; a(n)=t(n)+c(n)=t+c, where t=number of transient terms, c=number of recurrent terms (in the terminal cycle).

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 1, 2, 3, 3, 1, 3, 2, 2, 3, 3, 4, 2, 2, 4, 2, 2, 3, 4, 2, 4, 4, 2, 3, 4, 4, 4, 5, 4, 3, 5, 4, 4, 4, 2, 5, 3, 4, 4, 4, 4, 2, 4, 3, 4, 6, 5, 5, 4, 5, 5, 4, 4, 2, 4, 5, 3, 4, 4, 3, 5, 4, 5, 3, 4, 2, 4, 4, 3, 3, 5, 3, 5, 3, 4, 4, 4, 3, 4, 5, 5, 3, 4, 3, 3, 3, 5, 3, 5, 2, 6, 4, 3, 7, 5, 3, 3, 3, 5
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=255: list={255,144,360,288,[432,480],432,...}, t=transient=4, c=cycle=2, a(255)=t+c=6;
n=244: list={244,180,144,360,288,[432,480],432,...}, t=5, c=2, a(244)=7.
		

Crossrefs

Programs

  • Mathematica
    fs[x_] :=EulerPhi[DivisorSigma[1, x]] itef[x_, len_] :=NestList[fs, x, len] Table[Length[Union[itef[2^w, 20]]], {w, 1, 256}] (* len=20 at n<=256 is suitable *)
  • Scheme
    (define (A096859 n) (let loop ((visited (list n)) (i 1)) (let ((next (A062401 (car visited)))) (cond ((member next visited) i) (else (loop (cons next visited) (+ 1 i))))))) ;; Antti Karttunen, Nov 18 2017

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

A036845 a(n) = min_{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, 2, 2, 4, 2, 4, 4, 4, 4, 4, 4, 12, 4, 8, 8, 16, 4, 16, 8, 12, 4, 12, 8, 12, 12, 16, 12, 16, 8, 16, 16, 12, 16, 16, 12, 36, 16, 16, 16, 16, 12, 32, 12, 16, 12, 16, 16, 32, 12, 32, 16, 32, 16, 16, 16, 36, 16, 16, 16, 48, 16, 36, 32, 48, 12, 48, 32, 16, 16, 48, 16, 72, 36, 16
Offset: 1

Views

Author

Joseph L. Pe, Jan 09 2002

Keywords

Comments

Conjecture: The sequence {T(n,k)} is eventually periodic for every n, so a(n) can be computed in finite time.
Conjecture: a(n) -> infinity as n -> infinity.

Examples

			The sequence {T(5,k)} is 4, 7, 6, 12, 4, 7, 6, 12,..., whose minimum value is 4. Hence a(5) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[ n_ ] := For[ m=EulerPhi[ n ]; min=Infinity; seq={m}, True, AppendTo[ seq, m ], If[ m
    				

Formula

a(n) = A096865(A000010(n)). - Antti Karttunen, Dec 06 2017

Extensions

Edited by Dean Hickerson, Jan 18 2002

A096860 Function A062401(x) = phi(sigma(x)) = f(x) is iterated. Starting with n, a(n) is the count of distinct terms arising in the transient of this trajectory, that is: a(n) = A096859(n) - A095955(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 0, 2, 1, 1, 4, 2, 3, 1, 3, 3, 1, 1, 0, 1, 3, 1, 2, 1, 1, 3, 2, 3, 1, 1, 0, 2, 2, 1, 1, 3, 1, 3, 1, 2, 2, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 3, 1, 3, 0, 4, 2, 1, 5, 3, 1, 1, 1, 3
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=255: list={255,144,360,288,[432,480],432,...}, t=transient=4, c=cycle=2, a(255)=t=4;
n=244: list={244,180,144,360,288,[432,480],432,...}, a(244)=4.
a(n)=0 means that n is a recurrent term from A096850.
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 120}, Array[Length@ Union@ # - Length@ Select[Tally@ #, Last@ # > 1 &] &@ NestList[EulerPhi@ DivisorSigma[1, #] &, #, nn] &, 105]] (* Michael De Vlieger, Nov 18 2017 *)
  • Scheme
    (define (A096860 n) (let loop ((visited (list n))) (let ((next (A062401 (car visited)))) (cond ((member next visited) => (lambda (transientplusone) (- (length transientplusone) 1))) (else (loop (cons next visited))))))) ;; Antti Karttunen, Nov 18 2017

A032450 Period of finite sequence g(n) related to Poulet's Conjecture.

Original entry on oeis.org

1, 3, 2, 2, 3, 7, 6, 12, 4, 2, 3, 12, 4, 7, 6, 4, 7, 6, 12, 15, 8, 12, 28, 6, 12, 4, 7, 12, 4, 7, 6, 28, 12, 6, 12, 4, 7, 8, 15, 8, 15, 31, 30, 72, 24, 60, 16, 6, 12, 4, 7, 24, 60, 16, 31, 30, 72, 8, 15, 12, 28, 16, 31, 30, 72, 24, 60, 12, 28, 8, 15, 60, 16
Offset: 1

Views

Author

Ursula Gagelmann (gagelmann(AT)altavista.net), Apr 07 1998

Keywords

Comments

Poulet's Conjecture states that for any integer n, the sequence f_0(n) = n, f_2k+1(n)=sigma(f_2k(n)), f_2k(n)=phi(f_2k-1(n)) (where sigma = A000203 and phi = A000010) is eventually periodic.

Examples

			Poulet's sequence starting at 1 is 1->1->1->.. which contributes [1]. Starting at 2: 2->3->2->3->.. which contributes [3,2]. Starting at 3: 3->4->2->3->2->3... which contributes [2,3]. Starting at 4: 4->7->6->12->4->7->6->12.. which contributes  [7, 6, 12, 4]. - _R. J. Mathar_, May 08 2020
		

References

  • P. Poulet, Nouvelles suites arithmétiques, Sphinx vol. 2 (1932) pp. 53-54.

Crossrefs

Formula

g(1)=n; thereafter g(2k)=sigma(g(2k-1)), g(2k+1)=phi(g(2k)).

Extensions

Revised definition and added formula from Ursula Gagelmann, Apr 07 1998 - N. J. A. Sloane, May 08 2020
Missing a(42)=31 inserted and more terms from Sean A. Irvine, Jun 21 2020
Showing 1-6 of 6 results.