Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Jun 10 2020 07:52:47
%S 0,1,4,9,40,169,1054,4385,9824,43681,271910,587501,2621914,16318985,
%T 67897854,287910401,643718656,2862785025,17820428806,38503642637,
%U 171834999354,725843640053,4526896839672,18833430998741,42193758837154
%N Numerator of the n-th convergent to Sum_{k>=0} 1/2^(2^k).
%H Robert Israel, <a href="/A073414/b073414.txt">Table of n, a(n) for n = 1..1650</a>
%F a(n) = a(n-1) A007400(n-1) + a(n-2). - _Robert Israel_, Jun 14 2016
%p a007400:= proc(n) option remember; local n8, n16;
%p n8:= n mod 8;
%p if n8 = 0 or n8 = 3 then return 2
%p elif n8 = 4 or n8 = 7 then return 4
%p elif n8 = 1 then return procname((n+1)/2)
%p elif n8 = 2 then return procname((n+2)/2)
%p fi;
%p n16:= n mod 16;
%p if n16 = 5 or n16 = 14 then return 4
%p elif n16 = 6 or n16 = 13 then return 6
%p fi
%p end proc:
%p a007400(0):= 0: a007400(1):= 1: a007400(2):= 4:
%p A[1]:= 0: A[2]:= 1:
%p for n from 3 to 100 do
%p A[n]:= A[n-1]*a007400(n-1)+A[n-2];
%p od:
%p seq(A[n],n=1..100); # _Robert Israel_, Jun 14 2016
%t (* b is a007400 *)
%t b[n_] := b[n] = Module[{n8, n16}, n8 = Mod[n, 8]; Which[n8 == 0 || n8 == 3, Return[2], n8 == 4 || n8 == 7, Return[4], n8 == 1, Return[b[(n+1)/2]], n8 == 2, Return[b[(n+2)/2]]]; n16 = Mod[n, 16]; Which[n16 == 5 || n16 == 14, Return[4], n16 == 6 || n16 == 13, Return[6]]];
%t b[0] = 0; b[1] = 1; b[2] = 4;
%t a[1] = 0; a[2] = 1;
%t a[n_] := a[n] = a[n-1] b[n-1] + a[n-2];
%t Array[a, 100] (* _Jean-François Alcover_, Jun 10 2020, after _Robert Israel_ *)
%o (PARI) a(n)=component(component(contfracpnqn(contfrac(sum(k=0,20,1/2^(2^k)),n)),1),1)
%Y Cf. A007400, A007404, A073415.
%K easy,frac,nonn
%O 1,3
%A _Benoit Cloitre_, Aug 23 2002