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.
%I A343949 #10 May 11 2021 05:58:25 %S A343949 1,2,4,8,12,18,26,36,52,70,102,136,200,266,394,524,780,1038,1550,2064, %T A343949 3088,4114,6162,8212,12308,16406,24598,32792,49176,65562,98330,131100, %U A343949 196636,262174,393246,524320,786464,1048610,1572898,2097188,3145764,4194342,6291494 %N A343949 Shortest distance from curve start to end along the segments of dragon curve expansion level n, and which is the diameter of the curve as a graph. %C A343949 Expansion level n is the first 2^n segments of the curve, and can be taken as a graph with visited points as vertices and segments as edges. %H A343949 Kevin Ryde, <a href="/A343949/b343949.txt">Table of n, a(n) for n = 0..1000</a> %H A343949 Kevin Ryde, <a href="http://user42.tuxfamily.org/dragon/index.html">Iterations of the Dragon Curve</a>, see index "Diameter". %H A343949 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-2,2). %F A343949 a(0) = 1. %F A343949 a(2*n) = 3*2^n + 2*n - 4 = 2*A275970(n-1), for n>=1. %F A343949 a(2*n+1) = 4*2^n + 2*n - 2 = 2*A083706(n). %F A343949 a(n+1) - a(n) = 2*A228693(n), for n>=1. %F A343949 a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 2*a(n-4) + 2*a(n-5) for n >= 6. %F A343949 G.f.: (1 + x - x^2 + x^3 - 4*x^5) / ((1+x) * (1-x)^2 * (1-2*x^2)). %F A343949 G.f.: 2 - (1/2)/(1+x) - (9/2)/(1-x) + 1/(1-x)^2 + (3 + 4*x)/(1 - 2*x^2). %e A343949 Curve n=4: %e A343949 *--* *--* %e A343949 | | | | Start S to end E along segments. %e A343949 *--*--* *--* Distance a(4) = 12, %e A343949 | | which is also graph diameter. %e A343949 E *--* S--* %e A343949 | | %e A343949 *--* %o A343949 (PARI) a(n) = if(n==0,1, my(t=n%2); (3+t)<<(n>>1) + n-4 + t); %Y A343949 Cf. A275970, A083706, A228693. %Y A343949 Cf. A332383, A332384 (curve coordinates). %K A343949 nonn,easy %O A343949 0,2 %A A343949 _Kevin Ryde_, May 05 2021