cp's OEIS Frontend

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.

A213626 a(n) = Sum_{0<=i b(i)*b(j)*b(k), where b(m) = A020985(m).

This page as a plain text file.
%I A213626 #32 Feb 12 2023 11:31:49
%S A213626 0,0,1,-2,-2,0,-5,-4,0,8,21,2,-10,-16,-15,-20,-20,-16,-7,-22,-14,0,
%T A213626 -21,-8,-28,-40,-45,-46,-42,-32,-49,-40,-24,0,33,-10,22,64,11,52,104,
%U A213626 168,245,154,78,16,65,4,-44,-80,-105,-90,-114,-128,-123,-136,-132,-120
%N A213626 a(n) = Sum_{0<=i<j<k<=n} b(i)*b(j)*b(k), where b(m) = A020985(m).
%H A213626 Alois P. Heinz, <a href="/A213626/b213626.txt">Table of n, a(n) for n = 0..15000</a>
%p A213626 b:= proc(n) option remember; local r;
%p A213626       `if`(n=0, 1, `if`(irem(n, 2, 'r')=0, b(r), b(r)*(-1)^r))
%p A213626     end:
%p A213626 s:= proc(j) option remember; `if`(j<0, 0, s(j-1)+b(j)       ) end:
%p A213626 t:= proc(k) option remember; `if`(k<1, 0, t(k-1)+b(k)*s(k-1)) end:
%p A213626 a:= proc(n) option remember; `if`(n<2, 0, a(n-1)+b(n)*t(n-1)) end:
%p A213626 seq(a(n), n=0..100);
%t A213626 b[n_] := b[n] = Module[{q, r}, If[n==0, 1, {q, r}=QuotientRemainder[n, 2]; If[r == 0, b[q], b[q]*(-1)^q]]];
%t A213626 s[j_] := s[j] = If[j < 0, 0, s[j-1] + b[j]];
%t A213626 t[k_] := t[k] = If[k < 1, 0, t[k-1] + b[k]*s[k-1]];
%t A213626 a[n_] := a[n] = If[n < 2, 0, a[n-1] + b[n]*t[n-1]];
%t A213626 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jun 01 2022, after _Alois P. Heinz_ *)
%o A213626 (Python)
%o A213626 def A213626(n): return sum((-1 if (i&(i>>1)).bit_count()&1 else 1)*sum((-1 if (j&(j>>1)).bit_count()&1 else 1)*sum(-1 if (k&(k>>1)).bit_count()&1 else 1 for k in range(j+1,n+1)) for j in range(i+1,n+1)) for i in range(n+1)) # _Chai Wah Wu_, Feb 12 2023
%Y A213626 Cf. A020985, A190173, A213786, A213787.
%K A213626 sign,look
%O A213626 0,4
%A A213626 _Alois P. Heinz_, Jun 23 2012