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.

A278216 Number of children that node n has in the tree defined by the edge relation A255131(child) = parent, "the least squares beanstalk".

Original entry on oeis.org

4, 0, 0, 4, 0, 0, 1, 0, 3, 1, 0, 3, 0, 0, 0, 2, 2, 0, 2, 2, 0, 1, 0, 0, 4, 0, 0, 3, 0, 0, 2, 0, 2, 0, 0, 4, 0, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 0, 3, 0, 1, 3, 0, 1, 1, 0, 3, 0, 0, 3, 0, 0, 0, 3, 1, 0, 2, 2, 0, 0, 1, 1, 2, 1, 1, 2, 0, 0, 1, 0, 3, 1, 0, 3, 0, 1, 0, 1, 3, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 4, 0, 0, 2, 0, 2, 1, 0, 3, 1, 0, 0, 2, 1, 0, 1, 3, 0, 1, 0, 0, 4
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Examples

			a(0) = 4 as 0 - A002828(0) = 0, 1 - A002828(1) = 0, 2 - A002828(2) = 0 and 3 - A002828(3) = 0. (But 4 - A002828(4) = 3.) Note that 0 is the only number which is its own child as 0 - A002828(0) = 0.
		

Crossrefs

Cf. A278490 (positions of zeros), A278489 (positions of nonzeros), A278491 (positions of 4's).

Programs

  • Scheme
    (define (A278216 n) (let loop ((s 0) (k (+ 4 n))) (if (< k n) s (loop (+ s (if (= n (A255131 k)) 1 0)) (- k 1)))))

Formula

a(n) = Sum_{i=0..4} [A002828(n+i) = i]. (Here [ ] is the Iverson bracket, giving as its result 1 only if A002828(n+i) is i, otherwise zero.)