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.

A255327 a(n) = 0 if n is in the infinite trunk of "number-of-runs beanstalk" (one of the terms of A255056), otherwise number of nodes (including leaves and the node n itself) in that finite subtree of the beanstalk.

This page as a plain text file.
%I A255327 #8 Feb 21 2015 15:37:14
%S A255327 0,1,0,1,0,1,0,1,2,1,0,1,0,1,0,1,5,1,0,1,2,1,0,1,2,1,0,1,0,1,0,1,0,1,
%T A255327 3,1,0,1,2,1,4,1,0,1,2,1,0,1,5,1,0,1,2,1,0,1,2,1,0,1,0,1,0,1,0,1,3,1,
%U A255327 0,1,2,1,10,1,0,1,8,1,0,1,3,1,2,1,0,1,2,1,4,1,0,1,2,1,0,1,0,1,3,1,0,1,2,1,4,1,0,1,2,1,0,1,5,1,0,1,2,1,0
%N A255327 a(n) = 0 if n is in the infinite trunk of "number-of-runs beanstalk" (one of the terms of A255056), otherwise number of nodes (including leaves and the node n itself) in that finite subtree of the beanstalk.
%C A255327 The edge-relation between nodes is given by A236840(child) = parent. a(n) = 1 + the size of transitive closure of all children emanating from the parent at n. For any n in A255056 this would be infinite, thus such n are marked with zeros.
%C A255327 Odd numbers are leaves, as there are no such k that A236840(k) were odd, thus a(2n+1) = 1.
%H A255327 Antti Karttunen, <a href="/A255327/b255327.txt">Table of n, a(n) for n = 0..8590</a>
%F A255327 a(2n+1) = 1, and for even numbers 2n, if A255339(n) = 1, then a(2n) = 0, otherwise, a(2n) = 1 + sum_{k = A091067(n) .. A255068(n)} a(k).
%o A255327 (Scheme, with memoization-macro definec)
%o A255327 (definec (A255327 n) (cond ((odd? n) 1) ((= 1 (A255339 (/ n 2))) 0) (else (+ 1 (add A255327 (A091067 (/ n 2)) (A255068 (/ n 2)))))))
%o A255327 ;; Auxiliary function add implements sum_{i=lowlim..uplim} intfun(i)
%o A255327 (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
%Y A255327 Cf. A091067, A236840, A255056, A255068, A255328, A255329, A255330, A255339.
%Y A255327 Cf. also A213727, A227643.
%K A255327 nonn
%O A255327 0,9
%A A255327 _Antti Karttunen_, Feb 21 2015