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-3 of 3 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

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

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
Showing 1-3 of 3 results.