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.

A278537 a(n) = index of the column where n is located in array A278511, a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 1, 4, 2, 5, 3, 6, 1, 7, 2, 8, 4, 9, 1, 10, 3, 11, 5, 12, 2, 13, 1, 14, 6, 15, 2, 16, 4, 17, 7, 18, 3, 19, 1, 20, 8, 21, 2, 22, 5, 23, 9, 24, 1, 25, 3, 26, 10, 27, 4, 28, 6, 29, 11, 30, 2, 31, 1, 32, 12, 33, 2, 34, 7, 35, 13, 36, 3, 37, 5, 38, 14, 39, 1, 40, 8, 41, 15, 42, 4, 43, 2, 44, 16, 45, 1, 46, 9, 47, 17, 48, 6, 49, 3, 50, 18, 51, 2, 52
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

a(1) = 0 as the 1 is outside of array A278511 proper.

Crossrefs

Programs

  • Scheme
    (define (A278537 n) (cond ((= 1 n) 0) ((not (zero? (A278169 n))) 1) ((even? n) (/ n 2)) (else (+ 1 (A278529 n)))))

Formula

a(1) = 0; for n > 1, if A278169(n) = 1 [when n is > 1 and in A000960], a(n) = 1, a(2n) = n, and for the rest of odd numbers, a(n) = 1 + A278529(n).