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.

A219666 The infinite trunk of factorial expansion beanstalk. The only infinite sequence such that a(n-1) = a(n) - sum of digits in factorial expansion of a(n).

This page as a plain text file.
%I A219666 #21 Jun 29 2016 00:20:52
%S A219666 0,1,2,5,7,10,12,17,23,25,28,30,35,40,46,48,52,57,63,70,74,79,85,92,
%T A219666 97,102,109,119,121,124,126,131,136,142,144,148,153,159,166,170,175,
%U A219666 181,188,193,198,204,213,221,228,238,240,244,249,255,262,266,271,277
%N A219666 The infinite trunk of factorial expansion beanstalk. The only infinite sequence such that a(n-1) = a(n) - sum of digits in factorial expansion of a(n).
%C A219666 a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "factorial beanstalk" from its root (zero).
%C A219666 There are many finite sequences such as 0,1,2,4; 0,1,2,5,6; etc. obeying the same condition (see A219659) and as the length increases, so (necessarily) does the similarity to this infinite sequence.
%C A219666 See A007623 for the factorial number system representation.
%H A219666 Antti Karttunen, <a href="/A219666/b219666.txt">Table of n, a(n) for n = 0..21622</a>
%F A219666 a(0) = 0, a(1) = 1, and for n>1, if A226061(A230411(n)) = n then a(n) = A230411(n)!-1, otherwise a(n) = a(n+1) - A034968(a(n+1)).
%F A219666 a(n) = A230416(A230432(n)).
%t A219666 nn = 10^3; m = 1; While[m! < Floor[6 nn/5], m++]; m; t = TakeWhile[Reverse@ NestWhileList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, Floor[6 nn/5], # > 0 &], # <= nn &] (* _Michael De Vlieger_, Jun 27 2016, Version 10.2 *)
%o A219666 (Scheme) ;; Memoizing definec-macro from Antti Karttunen's IntSeq-library
%o A219666 (definec (A219666 n) (cond ((<= n 2) n) ((= (A226061 (A230411 n)) n) (- (A000142 (A230411 n)) 1)) (else (- (A219666 (+ n 1)) (A034968 (A219666 (+ n 1)))))))
%o A219666 ;; Another variant, utilizing A230416 (which gives a more convenient way to compute large number of terms of this sequence):
%o A219666 (define (A219666 n) (A230416 (A230432 n)))
%o A219666 ;; This function is for checking whether n belongs to this sequence:
%o A219666 (define (inA219666? n) (or (zero? n) (= 1 (- (A230418 (+ 1 n)) (A230418 n)))))
%Y A219666 Cf. A007623, A034968, A219651, A230411, A226061. For all n, A219652(a(n)) = n and A219653(n) <= a(n) <= A219655(n).
%Y A219666 Characteristic function: Χ_A219666(n) = A230418(n+1)-A230418(n).
%Y A219666 The first differences: A230406.
%Y A219666 Other derived sequences: A230425-A230427, A230430, A230407-A230409, A219662 & A219663, A231723 & A231724, A230420, A230410, A231717, A231719.
%Y A219666 Subsets: A230428 & A230429.
%Y A219666 Analogous sequence for binary system: A179016, for Fibonacci number system: A219648.
%K A219666 nonn,base
%O A219666 0,3
%A A219666 _Antti Karttunen_, Nov 25 2012