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 A324288 #10 May 05 2023 12:35:56 %S A324288 1,1,1,3,1,4,5,2,1,5,7,3,7,2,5,8,1,6,9,4,10,3,8,13,9,2,7,12,8,11,10,7, %T A324288 1,7,11,5,13,4,11,18,13,3,11,19,13,18,17,12,11,2,9,16,12,17,18,13,11, %U A324288 14,13,10,18,11,4,13,1,8,13,6,16,5,14,23,17,4,15,26,18,25,24,17,16,3,14,25,19,27,29,21,18,23,22,17,31,19,7,23,13,2 %N A324288 a(n) = A002487(1+A005187(n)). %H A324288 Antti Karttunen, <a href="/A324288/b324288.txt">Table of n, a(n) for n = 0..16384</a> %H A324288 Antti Karttunen, <a href="/A324288/a324288.txt">Data supplement: n, a(n) computed for n = 0..65537</a> %H A324288 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A324288 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %F A324288 a(n) = A002487(1+A005187(n)). %o A324288 (PARI) %o A324288 A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); }; \\ Modified from the one given in A002487, sign not actually needed here. %o A324288 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; %o A324288 A324288(n) = A002487(1+A005187(n)); %o A324288 (Python) %o A324288 from functools import reduce %o A324288 def A324288(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(1+(n<<1)-n.bit_count())[-1:2:-1],(1,0))) if n else 1 # _Chai Wah Wu_, May 05 2023 %Y A324288 Cf. A002487, A005187, A324287, A324116. %K A324288 nonn %O A324288 0,4 %A A324288 _Antti Karttunen_, Feb 20 2019