login
A088431
Half of the (n+1)-st component of the continued fraction expansion of Sum_{k>=0} 1/2^(2^k).
5
2, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 2, 3
OFFSET
1,1
COMMENTS
To construct the sequence use the rule: a(1)=2, then a(a(1) + a(2) + ... + a(n) + 1) = 2 and fill in any undefined places with the sequence 1,3,1,3,1,3,1,3,1,3,1,3,....
This sequence appears to be the sequence of run lengths of the regular paperfolding sequence A014577, i.e., the latter starts as follows: 2 zeros, 1 one, 2 zeros, 2 ones, etc. - Dimitri Hendriks, May 06 2010
Hendriks' conjecture is proved in Bunder, Bates, and Arnold (2024). Also see Shallit (2024). - Jeffrey Shallit, Mar 10 2025
LINKS
Martin Bunder, Bruce Bates, and Stephen Arnold, The summed paperfolding sequence, Bull. Austral. Math. Soc. 110 (2024), 189-198.
Kevin Ryde, Iterations of the Dragon Curve, see index "TurnRun", with a(n) = TurnRun(n-1).
Jeffrey Shallit, Runs in Paperfolding Sequences, arXiv:2412.17930 [math.CO], 2024. See p. 10.
FORMULA
a(n) = (1/2)*A007400(n+1); a(a(1) + a(2) + ... + a(n) + 1) = 2.
EXAMPLE
Example to illustrate the comment: a(a(1)+1)=a(3)=2 and a(2) is undefined. The rule requires a(2)=1. Next, a(a(1)+a(2)+1)=a(4)=2, a(a(1)+a(2)+a(3)+1)=a(6)=2 and a(5) is undefined. The rule now requires a(5)=3.
MATHEMATICA
a[n_] := a[n] = Which[n < 3, {0, 1, 4}[[n + 1]], Mod[n, 8] == 1, a[(n + 1)/2], Mod[n, 8] == 2, a[(n + 2)/2], True, {2, 0, 0, 2, 4, 4, 6, 4, 2, 0, 0, 2, 4, 6, 4, 4}[[Mod[n, 16] + 1]]]; Array[a[# + 1]/2 &, 98] (* after Jean-François Alcover at A007400 *)
PROG
(Scheme) (define (A088431 n) (* 1/2 (A007400 (+ 1 n)))) ;; Code for A007400 given under that entry. - Antti Karttunen, Aug 12 2017
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Benoit Cloitre, Nov 08 2003
STATUS
approved