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.

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

A097007 a(n) = index of first appearance of n in A096859.

Original entry on oeis.org

1, 3, 7, 18, 34, 52, 100, 422, 882, 1008, 960, 912, 784, 1497, 3187, 13456, 21336, 42682, 69696, 50176, 73191, 112896, 88452, 151828, 140736, 198876, 245028, 187272, 252964, 207936, 229456, 447201, 1412589, 9734400, 7757136, 7910076
Offset: 1

Views

Author

Labos Elemer, Jul 26 2004

Keywords

Comments

a(n) = smallest k such that A096860(k) + A095955(k) = n.
a(n) = smallest k such that n equals the index of the term that completes the first cycle in the trajectory of k under iteration of f(x) = A062401(x) = phi(sigma(x)).

Examples

			The trajectory of 18 under iteration of f(x) is 18, 24, 16, 30, 24, 16, 30, ...; the cycle (24, 16, 30) is completed at the fourth term and for j < 18 the first cycle in trajectory of j under iteration of f(x) is completed at the first, second or third term, hence a(4) = 18.
The trajectory of 69696 under iteration of f(x) is 69696, 163296, 157248, 193536, 247808, 217728, 147456, 324000, 285120, 332640, 331776, 900900, 967680, 991232, 1143072, 2122848, 2201472, 1658880, 1801800, 1658880, 1801800, ...; the cycle (1658880, 1801800) is completed at the 19th term and for j < 69696 the first cycle in trajectory
of j under iteration of f(x) is completed at an earlier term, hence a(19) = 69696.
		

Crossrefs

Programs

  • Mathematica
    fs[x_] :=EulerPhi[DivisorSigma[1, x]]; nsf[x_, ho_] :=NestList[fs, x, ho]; luf[x_, ho_] :=Length[Union[nsf[x, ho]]] t=Table[0, {35}]; Do[s=luf[n, 100]; If[s<36&&t[[s]]==0, t[[s]]=n], {n, 1, 1600000}]; t
  • PARI
    {v=vector(40); for(n=1, 10000000, k=n; s=Set(k); until(setsearch(s, k=eulerphi(sigma(k))), s=setunion(s, Set(k))); a=#s; if(a<=m&&v[a]==0, v[a]=n)); v} /* Klaus Brockhaus, Jul 16 2007 */

Extensions

Edited, a(27) corrected and a(34) through a(36) added by Klaus Brockhaus, Jul 16 2007

A096865 Function A062401(x) = phi(sigma(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, 2, 2, 4, 2, 4, 4, 8, 9, 4, 4, 12, 4, 8, 8, 16, 4, 16, 8, 12, 16, 12, 8, 16, 16, 12, 16, 16, 8, 16, 16, 32, 16, 16, 16, 36, 16, 16, 16, 16, 12, 32, 12, 16, 16, 16, 16, 48, 36, 48, 16, 32, 16, 32, 16, 32, 32, 16, 16, 48, 16, 32, 48, 64, 16, 48, 32, 36, 32, 48, 16, 72, 36, 36, 48
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=255: list={255,144,360,288,[432,480],432,...}, a(255)=144 as a transient term;
n=254: list={254,[128],128,...}, a(254)=128, as a fixed point.
		

Crossrefs

Cf. A062401, A062402, A095955, A096859, A096860, A096861 (largest term).
Cf. also A096866.

Programs

  • Mathematica
    fs[x_] :=EulerPhi[DivisorSigma[1, x]] itef[x_, hos_] :=NestList[fs, x, hos] Table[Min[itef[w, 20]], {w, 1, 256}]
  • Scheme
    (define (A096865 n) (let loop ((visited (list n)) (m n)) (let ((next (A062401 (car visited)))) (cond ((member next visited) m) (else (loop (cons next visited) (min m next))))))) ;; 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

A096862 Function A062402(x)=sigma(phi(x)) is iterated. Starting with n, a(n) is the count of distinct terms arising during this trajectory; a(n)=t(n)+c(n)=t+c, where t is the number of transient terms, c is the number of recurrent terms [in the terminal cycle].

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=256: list={256,255,255}, transient=t=1, cycle=c=1, a(256)=t+c=2.
		

Crossrefs

Programs

  • Mathematica
    gf[x_] :=DivisorSigma[1, EulerPhi[x]] gite[x_, hos_] :=NestList[gf, x, hos] Table[Length[Union[gite[w, 1000]]], {w, 1, 256}]

A096863 Function A062402(x)=sigma(phi(x)) is iterated. Starting with n, a(n) is the count of transient terms of trajectory.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Comments

a(n)=0 means that n is a recurrent term from A096998.

Examples

			n=256: list={256,255,255}, a(256)=1;
n=101: list={101,217,546,403,1170,819,[1240,1512],1240,...,a(101)=6;
		

Crossrefs

Formula

a(n) = A096861(n)-A096993(n).

A097005 A062401(x) is iterated. Initial value = n!. a(n) is the path-length of trajectory = count of transients and recurrent terms, i.e., all distinct states arising in trajectory.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 1, 9, 6, 14, 2, 51, 35, 81, 32, 31
Offset: 0

Views

Author

Labos Elemer, Jul 22 2004

Keywords

Examples

			n=10: 10! = 3628800; trajectory ={3628800, 5702400, 5702400, ...} a(10) = 2, one transient and 1 cycle term.
		

Crossrefs

Programs

  • Mathematica
    fs[x_]:=EulerPhi[DivisorSigma[1,x]] itef[x_,len_]:=NestList[fs,x,len] Table[Length[Union[itef[w!,1000]]],{w,0,16}]

Formula

a(n) = A096859(n!) = A096859(A000142(n)). - Michel Marcus, Jul 27 2017
Showing 1-7 of 7 results.