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 A319687 #16 May 19 2023 01:50:06 %S A319687 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,-2,0,0,0,2,0,0,0,0,2,0,0,4,0, %T A319687 0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,2,-2,0,0,0,4,0,4,0,0,2,0,0,6,0,8,4,0, %U A319687 0,0,0,0,0,0,0,0,0,-2,0,0,0,2,0,0,-2,-6,0,-4,0,0,0,-4,0,-6,0,10,0,0,0,4,2,0,-2,0,0,0 %N A319687 a(n) = A318509(n) - A002487(n). %C A319687 All terms seem to be even. See the conjecture given in A261179. %H A319687 Antti Karttunen, <a href="/A319687/b319687.txt">Table of n, a(n) for n = 1..65537</a> %H A319687 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %F A319687 a(n) = A318509(n) - A002487(n). %o A319687 (PARI) %o A319687 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487 %o A319687 A318509(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(f[i, 1])); factorback(f); }; %o A319687 A319687(n) = (A318509(n) - A002487(n)); %o A319687 (Python) %o A319687 from math import prod %o A319687 from functools import reduce %o A319687 from sympy import factorint %o A319687 def A319687(n): return prod(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(p)[-1:2:-1],(1,0)))**e for p, e in factorint(n).items())-sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) # _Chai Wah Wu_, May 18 2023 %Y A319687 Cf. A002487, A261179, A317837, A318509, A323365. %K A319687 sign,look %O A319687 1,15 %A A319687 _Antti Karttunen_, Oct 02 2018