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.

A306216 Successive concatenation of the current sequence with the first differences of the sequence, a(1) = a(2) = 1.

This page as a plain text file.
%I A306216 #15 Feb 01 2019 01:33:09
%S A306216 1,1,0,0,-1,0,-1,0,-1,0,-1,0,-1,1,-1,1,-1,0,-1,0,-1,1,-1,1,-1,1,-1,1,
%T A306216 -1,2,-2,2,-2,0,-1,0,-1,1,-1,1,-1,1,-1,1,-1,2,-2,2,-2,1,-1,1,-1,2,-2,
%U A306216 2,-2,2,-2,2,-2,3,-4,4,-4,0,-1,0,-1,1,-1,1,-1,1,-1
%N A306216 Successive concatenation of the current sequence with the first differences of the sequence, a(1) = a(2) = 1.
%C A306216 n | generation             | first differences
%C A306216 --+------------------------+-------------------
%C A306216 1 | [1,1]                  | [0]
%C A306216 2 | [1,1,0]                | [0,-1]
%C A306216 3 | [1,1,0,0,-1]           | [0,-1,0,-1]
%C A306216 4 | [1,1,0,0,-1,0,-1,0,-1] | [0,-1,0,-1,1,-1,1,-1]
%H A306216 Peter Kagey, <a href="/A306216/b306216.txt">Table of n, a(n) for n = 1..8193</a> (first 14 generations)
%t A306216 Nest[Join[#, Differences@ #] &, {1, 1}, 7] (* _Michael De Vlieger_, Jan 29 2019 *)
%o A306216 (Ruby)
%o A306216 generations = 10
%o A306216 (1...generations).reduce([1,1]) do |s, _|
%o A306216   s += s.each_cons(2).map { |a, b| b - a }
%o A306216 end
%o A306216 (Haskell)
%o A306216 a306216_list = 1 : 1 : concat (Data.List.unfoldr nextGeneration [1,1]) where
%o A306216   nextGeneration l = Just (diff l, l ++ diff l)
%o A306216   diff xs =  zipWith subtract xs (tail xs)
%Y A306216 Cf. A107946, A306211.
%K A306216 sign,look
%O A306216 1,30
%A A306216 _Peter Kagey_, Jan 29 2019