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.

A264969 Cycle length of n under bijection A264965 / A264966.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 1, 5, 3, 2, 1, 5, 1, 5, 1, 2, 3, 5, 1, 5, 3, 1, 1, 5, 1, 22, 2, 3, 9, 7, 1, 22, 9, 3, 1, 22, 2, 7, 4, 2, 9, 1, 1, 7, 9, 4, 4, 7, 1, 5, 1, 3, 9, 5, 1, 1, 3, 2, 2, 5, 2, 22, 1, 2, 9, 18, 1, 7, 3, 4, 4, 18, 4, 7, 1, 2, 3, 18, 1, 3, 10, 3, 10, 18, 1, 3, 8, 6, 3, 22, 2, 22, 9, 4, 4, 18, 3, 17, 10, 4, 10, 6, 1, 3, 3, 6, 1, 18, 4, 17, 8, 3, 3, 10, 1, 7
Offset: 0

Views

Author

Antti Karttunen, Dec 06 2015

Keywords

Comments

By convention: a(n) = 0 if the cycle where n resides can be proven to be infinite. a(n) = -1 is the placeholder value if the cycle where n resides is only suspected to be infinite.
Is n=262 the first representative of runaway cycle? See A264972 and A264973.

Examples

			A264965(5) = 7 and A264965(7) = 5, thus a(5) = a(7) = 2.
		

Crossrefs

Programs

  • Scheme
    ;; Very naive program which succumbs to the first infinite cycle:
    (define (A264969 n) (let loop ((s 1) (next (A264965 n))) (if (equal? next n) s  (loop (+ 1 s) (A264965 next)))))