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.

A277894 a(n) = the largest k < n for which A277892(k) = A277892(n), 0 if no such number exists, a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 3, 0, 4, 0, 6, 5, 8, 0, 9, 0, 12, 14, 15, 0, 10, 0, 16, 20, 18, 0, 22, 7, 21, 26, 27, 0, 24, 0, 30, 25, 28, 33, 34, 0, 36, 38, 32, 0, 40, 0, 35, 44, 42, 0, 39, 11, 48, 45, 50, 0, 46, 51, 54, 55, 49, 0, 57, 0, 60, 62, 52, 58, 56, 0, 63, 68, 66, 0, 70, 0, 64, 74, 69, 65, 75, 0, 76, 80, 78, 0, 81, 84, 82, 86, 72, 0, 87, 77, 85, 13, 92, 91, 88, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Crossrefs

Cf. A008578 (gives the positions of zeros after a(0)).

Programs

  • Scheme
    (define (A277894 n) (cond ((<= n 2) 0) (else (let ((v (A277892 n))) (let loop ((k (- n 1))) (cond ((= 1 k) 0) ((= (A277892 k) v) k) (else (loop (- k 1)))))))))

Formula

For n >= 3, a(A277893(n)) = n.