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

A096852 a(n) is the length of terminal cycle of the trajectory of f(x)=phi(sigma(x)) if started at 2^n.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 1, 2, 2, 6, 2, 1, 6, 2, 1, 2, 3, 11, 11, 2, 2, 15, 15, 18, 18, 18, 18, 12, 12, 12, 1
Offset: 0

Views

Author

Labos Elemer, Jul 16 2004

Keywords

Examples

			n=18: start = 262144 and the corresponding 11-cycle is 262144, 524286, [368640, 381024, 326592, 550368, 435456, 580608, 851840, 552960, 524160, 442368, 432000], 368640, ...
		

Crossrefs

Programs

  • Mathematica
    g[n_] := EulerPhi[ DivisorSigma[1, n]]; f[n_] := Block[{lst = NestWhileList[g, n, UnsameQ, All]}, -Subtract @@ Flatten[ Position[lst, lst[[ -1]]]]]; Table[ f[2^n], {n, 0, 20}]
  • PARI
    f(x)=eulerphi(sigma(x))
    a(n)=my(t=f(2^n), h=f(t), s); while(t!=h, t=f(t); h=f(f(h))); t=f(t); h=f(t); s=1; while(t!=h, s++; t=f(t); h=f(f(h))); s \\ Charles R Greathouse IV, Nov 27 2013

Formula

a(n) = A095955(2^n). - Charles R Greathouse IV, Nov 27 2013

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jul 17 2004

A096849 If f(x) = phi(sigma(x)) is iterated starting from these numbers, then the start-value never returns. These are the transient terms of this iteration. Never occur in terminal cycles.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83
Offset: 1

Views

Author

Labos Elemer, Jul 16 2004

Keywords

Examples

			All odd and certain even integers belong here.
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Table[Function[s, If[Length@ # > 0, First@ #, #] &@ Keys@ KeySelect[s, Length@ Lookup[s, #] == 1 &]]@ PositionIndex@ NestList[EulerPhi@ DivisorSigma[1, #] &, n, 10^2], {n, 71}] (* Michael De Vlieger, Jul 24 2017 *)

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

A096851 Even transient values of f(x)=phi(sigma(x)) iterations.

Original entry on oeis.org

10, 14, 18, 20, 22, 26, 28, 32, 34, 36, 38, 40, 42, 44, 46, 50, 52, 54, 56, 58, 62, 64, 66, 68, 70, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126
Offset: 1

Views

Author

Labos Elemer, Jul 16 2004

Keywords

Crossrefs

A096998 Consider iteration of the function f(x) = sigma(phi(x)) = A062402(x). Sequence lists the numbers k such that the trajectory of k returns to k.

Original entry on oeis.org

1, 3, 7, 12, 15, 28, 31, 60, 72, 124, 168, 195, 252, 255, 744, 1240, 1512, 1651, 2418, 2520, 3066, 3844, 4092, 4800, 5080, 5376, 6045, 6138, 6552, 9906, 9920, 10200, 12264, 20440, 30855, 36792, 46228, 58968, 60984, 65535, 67963, 81880, 122640
Offset: 1

Views

Author

Labos Elemer, Jul 19 2004

Keywords

Examples

			96 => 63 => 91 => 195 => 252 => 195 => ..., therefore 195 and 252 are in the sequence.
		

Crossrefs

Programs

  • Mathematica
    a = {}; f[n_] := DivisorSigma[1, EulerPhi[ n]]; Do[ AppendTo[ a, NestWhileList[f, n, UnsameQ, All][[ -1]]]; a = Union[a], {n, 10^6}]; Take[ a, 43] (* Robert G. Wilson v, Jul 21 2004 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jul 21 2004
Showing 1-5 of 5 results.