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.

A320667 First differences of A066194.

This page as a plain text file.
%I A320667 #26 Dec 14 2018 20:55:09
%S A320667 1,2,-1,5,-1,-2,1,10,-1,-2,1,-5,1,2,-1,21,-1,-2,1,-5,1,2,-1,-10,1,2,
%T A320667 -1,5,-1,-2,1,42,-1,-2,1,-5,1,2,-1,-10,1,2,-1,5,-1,-2,1,-21,1,2,-1,5,
%U A320667 -1,-2,1,10,-1,-2,1,-5,1,2,-1,85,-1,-2,1,-5,1,2,-1,-10
%N A320667 First differences of A066194.
%F A320667 a(n) = A066194(n+1) - A066194(n).
%F A320667 a(n) = (1/6)*(-3 + (-1)^A007814(n) + 2^(A007814(n)+3))*(-1)^(A000120(n)+1).
%e A320667 To obtain the first 2^n-1 entries if you have the first 2^(n-1)-1 entries, adjoin 1/6 (-3 + (-1)^(1 + n) + 2^(2 + n)) to the right end of the list, negate the signs of the first 2^(n-1)-1 entries, and then adjoin that list to the right. For example for n=3 {1,2,-1} becomes {1,2,-1,5,-1,-2,1}.
%t A320667 Fold[Join[#1, {#2}, -#1] &, {1},
%t A320667 Table[1/6 (-3 + (-1)^(1 + n) + 2^(2 + n)), {n, 2, 6}]]
%t A320667 t[n_/;IntegerQ[Log2[n]]]:=1/6 (-3 + (-1)^IntegerExponent[n,2] + 8*n);
%t A320667 t[n_/;Not[IntegerQ[Log2[n]]]]:=-t[n-2^Floor[Log2[n]]];
%t A320667 Table[t[j],{j,1,15}](* recursive formulation *)
%t A320667 Table[1/6 (-3+(-1)^IntegerExponent[j,2]+2^(IntegerExponent[j,2]+3))(-1)^(Total[IntegerDigits[j,2]]+1),{j,1,15}] (* closed form *)
%Y A320667 Cf. A066194.
%K A320667 sign
%O A320667 1,2
%A A320667 _John Erickson_, Oct 18 2018