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.

Previous Showing 21-30 of 76 results. Next

A097002 A062402(x)=sigma(phi[x]) function is iterated; initial value=2^n; a(n)=smallest term of trajectory.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 6045, 24552, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823
Offset: 1

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Examples

			n=13: 2^n=8192, trajectory ={8192, 8191, 26208, [20440], 20440, .. a[13]=8191 arose in transient.
		

Crossrefs

Programs

  • Mathematica
    gf[x_] :=DivisorSigma[1, EulerPhi[x]] gite[x_, hos_] :=NestList[gf, x, hos] Table[Min[gite[2^w, 200]], {w, 1, 30}]

A097003 Function A062402[x]=phi[sigma[x]] is iterated. a(n) is the number of distinct terms arising in the trajectory of 2^n; 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, 1, 2, 1, 3, 4, 4, 1, 3, 4, 10, 3, 3, 11, 16, 1, 7, 10, 13, 25, 10, 5, 79, 58, 99, 100, 94, 92, 59, 37, 54, 1
Offset: 0

Views

Author

Labos Elemer, Jul 21 2004

Keywords

Comments

Concerning this sequence and A097004, A096994, A096995: in all 4 cases the initial value is 2^n and a certain function is iterated. They differ either in the function or in what is computed for that iteration.
Glossary: t+c = total count of transient+cycle terms, t = count of transient terms
Sequence 1: A062401 is iterated t+c is computed => this sequence
Sequence 2: A062402 is iterated t+c is computed => A097004
Sequence 3: A062401 is iterated t is computed => A096994
Sequence 4: A062402 is iterated t is computed => A096995

Examples

			n=13: 2^n=8192, trajectory ={8192, 10584, 8640, 8064, 6144, [3456, 2560, 1800, 2880, 3024, 3840], 3456, 2560, ..}, t+c=a(13)=5+6=11;
		

Crossrefs

Programs

  • Mathematica
    EulerPhi[DivisorSigma[1, x]] itef[x_, len_] :=NestList[fs, x, len] Table[Length[Union[itef[2^w, 20]]], {w, 1, 256}]

A097006 Consider the function f(x)=sigma(phi(x))=A062402(x) iterated with initial value n!; a(n) is the path-length of trajectory.

Original entry on oeis.org

1, 1, 2, 2, 2, 5, 6, 5, 10, 10, 17, 49, 91
Offset: 0

Views

Author

Labos Elemer, Jul 22 2004

Keywords

Comments

The path length is the total number of transient and recurrent terms.
After 12000 iterations, f(13!) reaches 583880633503221176888439640142607059743547704176558111997560422400000.

Examples

			n=10: 10!=3628800; the trajectory is 3628800, 2972970, 2221560, 1915992, 1768767, 2877420, [1965840, 2227680, 1310680, 1591200, 1277874, 1307124, 1110488, 2010960, 1488032, 1981496, 2239920], [1965840, ...], ...; thus a(10)=17, with 6 transient and 11 recurrent states.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSigma[1, EulerPhi[n]]; g[n_] := Length[ NestWhileList[ f, n, UnsameQ, All]] - 1; Table[ g[n! ], {n, 12}] (* Robert G. Wilson v, Jul 23 2004 *)

Extensions

Edited by Robert G. Wilson v, Jul 23 2004

A062401 a(n) = phi(sigma(n)).

Original entry on oeis.org

1, 2, 2, 6, 2, 4, 4, 8, 12, 6, 4, 12, 6, 8, 8, 30, 6, 24, 8, 12, 16, 12, 8, 16, 30, 12, 16, 24, 8, 24, 16, 36, 16, 18, 16, 72, 18, 16, 24, 24, 12, 32, 20, 24, 24, 24, 16, 60, 36, 60, 24, 42, 18, 32, 24, 32, 32, 24, 16, 48, 30, 32, 48, 126, 24, 48, 32, 36, 32, 48, 24, 96, 36, 36, 60
Offset: 1

Views

Author

Jason Earls, Jul 08 2001

Keywords

Examples

			a(9) = 12 because sigma(9) = 13 and phi(13) = 12.
		

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, p. 14.

Crossrefs

Programs

  • Haskell
    a062401 = a000010 . a000203  -- Reinhard Zumkeller, Jan 04 2013
  • Maple
    with(numtheory); A062401:=n->phi(sigma(n)); seq(A062401(n), n=1..50); # Wesley Ivan Hurt, Apr 07 2014
  • Mathematica
    Table[EulerPhi[DivisorSigma[1, n]], {n, 1, 80}] (* Carl Najafi, Aug 16 2011 *)
  • PARI
    vector(150, n, eulerphi(sigma(n)))
    
  • PARI
    for (n=1, 10000, write("b062401.txt", n, " ", eulerphi(sigma(n))) ) \\ Harry J. Smith, Aug 07 2009
    

Formula

sigma(a(n)) = A062402(sigma(n)) or phi(A062402(n)) = a(phi(n)). - Labos Elemer, Jul 22 2004

A033632 Numbers k such that sigma(phi(k)) = phi(sigma(k)).

Original entry on oeis.org

1, 9, 225, 242, 516, 729, 3872, 13932, 14406, 17672, 18225, 20124, 21780, 29262, 29616, 45996, 65025, 76832, 92778, 95916, 106092, 106308, 114630, 114930, 121872, 125652, 140130, 140625, 145794, 149124, 160986, 179562, 185100, 234876, 248652, 252978, 256860
Offset: 1

Views

Author

Keywords

Comments

The largest term of this sequence that I found is 3^9550. Also, if (1/2)*(3^(k+1)-1) is prime (k+1 is a term of A028491) then 3^k is in the sequence, namely sigma(phi(3^k)) = phi(sigma(3^k)) (the proof is easy). - Farideh Firoozbakht, Feb 09 2005

References

  • R. K. Guy, Unsolved Problems in Number Theory, 2nd edition, Springer Verlag, 1994, section B42, p. 99.

Crossrefs

Programs

  • Haskell
    a033632 n = a033632_list !! (n-1)
    a033632_list = filter (\x -> a062401 x == a062402 x) [1..]
    -- Reinhard Zumkeller, Jan 04 2013
    
  • Mathematica
    Select[ Range[ 10^6 ], DivisorSigma[ 1, EulerPhi[ # ] ] == EulerPhi[ DivisorSigma[ 1, # ] ] & ]
  • PARI
    is(n)=sigma(eulerphi(n))==eulerphi(sigma(n)) \\ Charles R Greathouse IV, May 09 2013
    
  • Python
    from sympy import divisor_sigma as sigma, totient as phi
    def ok(n): return sigma(phi(n)) == phi(sigma(n))
    def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
    print(aupto(10**4)) # Michael S. Branicky, Jan 09 2021

Formula

A062401(a(n)) = A062402(a(n)). - Reinhard Zumkeller, Jan 04 2013

A065395 Commutator of sigma and phi functions.

Original entry on oeis.org

0, -1, 1, -3, 5, -1, 8, -1, 0, 1, 14, -5, 22, 4, 7, -15, 25, -12, 31, 3, 12, 6, 28, -1, 12, 16, 23, 4, 48, -9, 56, -5, 26, 13, 44, -44, 73, 23, 36, 7, 78, -4, 76, 18, 36, 12, 56, -29, 60, -18, 39, 18, 80, 7, 66, 28, 59, 32, 74, -17, 138, 40, 43, -63, 100, -6
Offset: 1

Views

Author

Labos Elemer, Nov 05 2001

Keywords

Comments

Golomb (1993) proved that the terms are both positive and negative infinitely often. - Amiram Eldar, Feb 27 2024

Examples

			n = 13: sigma(13) = 14, phi(14) = 6, phi(13) = 12, sigma(12) = 28, a(13) = 28-6 = 22.
		

References

  • Solomon W. Golomb, Equality among number-theoretic functions, Abstracts Amer. Math. Soc., Vol. 14 (1993), pp. 415-416.

Crossrefs

Cf. A000010, A000203, A033632 (positions of 0's), A062401, A062402.

Programs

  • Magma
    [DivisorSigma(1, EulerPhi(n))-EulerPhi(DivisorSigma(1, n)): n in [1..70]]; // Bruno Berselli, Oct 20 2015
  • Maple
    with(numtheory); A065395:=n->sigma(phi(n))-phi(sigma(n)); seq(A065395(n), n=1..100); # Wesley Ivan Hurt, Dec 26 2013
  • Mathematica
    Table[DivisorSigma[1, EulerPhi[n]] - EulerPhi[DivisorSigma[1, n]], {n, 100}] (* T. D. Noe, Nov 04 2013 *)
  • PARI
    a(n) = { sigma(eulerphi(n)) - eulerphi(sigma(n)) } \\ Harry J. Smith, Oct 18 2009
    

Formula

a(n) = sigma(phi(n)) - phi(sigma(n)) = A000203(A000010(n)) - A000010(A000203(n)).
a(n) = A062402(n) - A062401(n). - Amiram Eldar, Feb 27 2024

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

A062514 Numbers k such that sigma(phi(k)) is a prime.

Original entry on oeis.org

3, 4, 5, 6, 8, 10, 12, 17, 32, 34, 40, 48, 60, 85, 128, 136, 160, 170, 192, 204, 240, 4369, 8192, 8224, 8704, 8738, 10240, 10280, 10880, 12288, 12336, 13056, 15360, 15420, 16320, 65537, 131072, 131074, 131584, 139264, 139808, 163840, 164480, 174080
Offset: 1

Views

Author

Jason Earls, Jul 09 2001

Keywords

Comments

Numbers k such that A062402(k) is prime.

Examples

			Phi(174080)=65536. Sigma(65536) = 131071, a prime.
		

Crossrefs

Programs

  • PARI
    je=[]; for(n=1,300000,s=sigma(eulerphi(n)); if(isprime(s),je=concat(je,n))); je
    
  • PARI
    { n=0; for (m=1, 10^9, if(isprime(sigma(eulerphi(m))), write("b062514.txt", n++, " ", m); if (n==73, break)) ) } \\ Harry J. Smith, Aug 08 2009

A096857 a[n] is the length of terminal cycle of the trajectory of g[x]=sigma(phi(x)) if started at 2^n. Formally identical to A096852, but arguments are shifted by 1 and the iterated functions are different!.

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: 1

Views

Author

Labos Elemer, Jul 19 2004

Keywords

Comments

Offset=1 in contrast to A096852, where offset=0. Also the iterated functions deviate: A062401 iterated in A096852 and A062402 is repeated here; A096852(n)=A096857(n+1) appears to be true. While cycle-lengths seem identical, the composition of cycles are mostly different!

Examples

			n=5:iv=32 list={32,[31,72,60]} length=a(5)=3, while the parallel case of A096852(n)=b(n) is b[4] with [16,24,30] cycle.
Also A096857[11] starts with 2048 ends in 6-cycle: {2048,2047,4123,10890,8928,[9906,9920,12264,10200,6138,6045],9906,..
while A096852[11-1]=6 and the relevant 6-cycle is {1024,1936,3240,2640,[2880,3024,3840,3456,2560,1800],2880,... These are different cycles with identical lengths.
The initial value 146 leads to list with enormous terms.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSigma[1, EulerPhi[n]]; g[n_] := Block[{l = NestWhileList[f, 2^n, UnsameQ, All]}, -Subtract @@ Flatten[Position[l, l[[ -1]]]]]; Table[ g[n], {n, 25}] (* Robert G. Wilson v, Jul 21 2004 *)

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
Previous Showing 21-30 of 76 results. Next