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.

A249069 a(n+1) gives the number of occurrences of the first digit of a(n) in factorial base (i.e., A099563(a(n))) so far amongst the factorial base representations of all the terms up to and including a(n), with a(0)=0.

This page as a plain text file.
%I A249069 #12 Oct 25 2014 14:46:56
%S A249069 0,1,1,2,3,5,1,7,9,12,2,13,3,16,5,6,18,1,19,2,21,3,25,27,30,32,35,38,
%T A249069 40,41,43,45,48,13,14,15,16,18,6,53,20,7,57,21,8,64,24,65,27,69,28,72,
%U A249069 10,73,11,76,12,33,80,13,34,85,14,37,89,15,41,94,17,46,96,1,97,2,99,3,103,4,48,49,50
%N A249069 a(n+1) gives the number of occurrences of the first digit of a(n) in factorial base (i.e., A099563(a(n))) so far amongst the factorial base representations of all the terms up to and including a(n), with a(0)=0.
%H A249069 Antti Karttunen, <a href="/A249069/b249069.txt">Table of n, a(n) for n = 0..10080</a>
%e A249069    a(0) =  0 (by definition)
%e A249069    a(1) =  1 ('1' in factorial base), as 0 has occurred once in all the preceding terms.
%e A249069    a(2) =  1 as 1 has occurred once in all the preceding terms.
%e A249069    a(3) =  2 ('10' in factorial base), as digit '1' has occurred two times in total in all the preceding terms.
%e A249069    a(4) =  3 ('11' in factorial base), as '1' occurs once in each a(1) and a(2) and a(3).
%e A249069    a(5) =  5 ('21' in factorial base), as '1' occurs once in each of a(1), a(2) and a(3) and twice at a(4).
%e A249069    a(6) =  1 as '2' so far occurs only once at a(5)
%e A249069    a(7) =  7 = '101'
%e A249069    a(8) =  9 = '111'
%e A249069    a(9) = 12 = '200'
%e A249069   a(10) =  2 = '2'
%e A249069   a(11) = 13 = '201'
%e A249069   a(12) =  3 = '11'
%e A249069   a(12) =  3 = '11'
%e A249069   a(13) = 16 = '220'
%e A249069   a(14) =  5 = '21'
%e A249069   a(15) =  6 = '100'
%e A249069   a(16) = 18 = '300'
%e A249069   a(17) =  1 = '1'
%e A249069   a(18) = 19 = '301'
%e A249069   a(19) =  2 = '10'
%e A249069   a(20) = 21 = '311'
%e A249069   a(21) =  3 = '11'
%e A249069   a(22) = 25 = '1001'
%e A249069   a(23) = 27 = '1011'
%e A249069   a(24) = 30 = '1100'
%e A249069   a(25) = 32 = '1110'
%e A249069   a(26) = 35 = '1121'
%e A249069   a(27) = 38 = '1210' as the leftmost digit '1' has occurred 38 times in total in the factorial base expansions of the preceding terms a(0) - a(26).
%e A249069 etc.
%o A249069 (MIT/GNU Scheme with memoizing definec-macro from _Antti Karttunen_'s IntSeq-library)
%o A249069 (definec (A249069 n) (if (zero? n) n (vector-ref (A249069aux_digit_counts (- n 1)) (A099563 (A249069 (- n 1))))))
%o A249069 (definec (A249069aux_digit_counts n) (cond ((zero? n) (vector 1)) (else (let* ((start_n (A249069 n)) (copy-of-prevec (vector-copy (A249069aux_digit_counts (- n 1)))) (newsize (max (vector-length copy-of-prevec) (+ 1 (A246359 start_n)))) (digcounts-for-n (vector-grow copy-of-prevec newsize))) (let loop ((n start_n) (i 2)) (cond ((zero? n) digcounts-for-n) (else (vector-set! digcounts-for-n (modulo n i) (+ 1 (or (vector-ref digcounts-for-n (modulo n i)) 0))) (loop (floor->exact (/ n i)) (+ i 1)))))))))
%Y A249069 Cf. A249009 (analogous sequence in base-10).
%Y A249069 Differs from a variant A249070 for the first time at n=27, where a(27) = 38, while A249070(27) = 7.
%Y A249069 Cf. also A007623, A099563, A246359.
%K A249069 nonn,base
%O A249069 0,4
%A A249069 _Antti Karttunen_, Oct 20 2014