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.

A066437 a(n) = max_{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, 3, 3, 12, 3, 12, 12, 12, 12, 18, 12, 28, 12, 15, 15, 72, 12, 72, 15, 28, 18, 36, 15, 42, 28, 72, 28, 72, 15, 72, 72, 42, 72, 72, 28, 252, 72, 72, 72, 90, 28, 252, 42, 72, 36, 72, 72, 252, 42, 252, 72, 252, 72, 90, 72, 252, 72, 90, 72, 168, 72, 252, 252, 168, 42
Offset: 1

Views

Author

Joseph L. Pe, Jan 08 2002

Keywords

Comments

Conjecture: a(n) is always finite; i.e. the sequence {T(n,k)} is eventually periodic for every n.
a(n) >= sigma(phi(n)) >= phi(n); since phi(n) -> infinity with n, so does a(n).
Sequence is otherwise like A096864, except here the initial value n where the iteration is started from is ignored. - Antti Karttunen, Dec 06 2017

Examples

			For n=11, the sequence is 11, 10, 18, 6, 12, 4, 7, 6, 12, ..., whose maximum value is 18. Hence a(11) = 18.
		

Crossrefs

Programs

  • Mathematica
    a[ n_ ] := For[ m=n; max=0; seq={}, True, AppendTo[ seq, m ], If[ (m=DivisorSigma[ 1, EulerPhi[ m ] ])>max, max=m ]; If[ MemberQ[ seq, m ], Return[ max ] ] ]
  • Scheme
    (define (A066437 n) (let loop ((visited (list n)) (i 1) (m 1)) (let ((next ((if (odd? i) A000010 A000203) (car visited)))) (cond ((member next (reverse visited)) => (lambda (start_of_cyclic_part) (cond ((even? (length start_of_cyclic_part)) (max m next)) (else (loop (cons next visited) (+ 1 i) (max m next)))))) (else (loop (cons next visited) (+ 1 i) (max m next))))))) ;; Antti Karttunen, Dec 06 2017

Formula

a(n) = A096864(A062402(n)). - Antti Karttunen, Dec 06 2017

Extensions

Edited by Dean Hickerson, Jan 18 2002

A036840 a(n) is the average of the repeating terms of {T(n,k)} rounded to the nearest integer (rounding up if there's a choice), if {T(n,k)} is eventually periodic; = 0 otherwise. Here 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, 3, 3, 7, 3, 7, 7, 7, 7, 7, 7, 20, 7, 12, 12, 39, 7, 39, 12, 20, 7, 20, 12, 20, 20, 39, 20, 39, 12, 39, 39, 20, 39, 39, 20, 154, 39, 39, 39, 39, 20, 154, 20, 39, 20, 39, 39, 154, 20, 154, 39, 154, 39, 39, 39, 154, 39, 39, 39, 100, 39, 154, 154, 100, 20, 100, 154, 39, 39
Offset: 1

Views

Author

Joseph L. Pe, Jan 09 2002

Keywords

Comments

Conjecture: a(n) is never 0; i.e. the sequence {T(n,k)} is eventually periodic for every n.
a(n) - n can be thought of as the final score in the phi/sigma tug-of-war with seed n. For example a(5) - 5 = 7 - 5 = 2, so sigma wins by "2 points" over phi at 5. a(8) - 8 = 7 - 8 = -1, so phi wins by "1 point" over sigma at 8. a(3) - 3 = 3 - 3 = 0, so it is a tie at 3. Are sigma's margins of victory over phi bounded? Are phi's bounded?

Examples

			The sequence {T(5,k)} is 4, 7, 6, 12, 4, 7, .... The average of the repeating numbers is 7.25 which rounds off to 7. So a(5) = 7. The sequence {T(37,k)} is 36, 91, 72, 195, 96, 252, 72, 195, .... The average of the repeating numbers is 153.75, which rounds off to 154. So a(37) = 154.
		

Crossrefs

Programs

  • Mathematica
    a[ n_ ] := Module[ {}, For[ m=n; seq={}, !MemberQ[ seq, m ], m=DivisorSigma[ 1, EulerPhi[ m ] ], AppendTo[ seq, m ] ]; rp=Drop[ seq, Position[ seq, m ][ [ 1, 1 ] ]-1 ]; Floor[ 1/2+(Plus@@Join[ rp, EulerPhi/@rp ])/2/Length[ rp ] ] ]
  • Scheme
    (define (A036840 n) (let loop ((visited (list n)) (i 1)) (let ((next ((if (odd? i) A000010 A000203) (car visited)))) (cond ((member next (reverse visited)) => (lambda (start_of_cyclic_part) (cond ((even? (length start_of_cyclic_part)) (floor->exact (+ 1/2 (/ (apply + start_of_cyclic_part) (length start_of_cyclic_part))))) (else (loop (cons next visited) (+ 1 i)))))) (else (loop (cons next visited) (+ 1 i))))))) ;; Antti Karttunen, Dec 06 2017

Extensions

Edited by Dean Hickerson, Jan 18 2002

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