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.

A232563 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 4*x are in S, and duplicates are deleted as they occur.

This page as a plain text file.
%I A232563 #4 Nov 27 2013 13:29:54
%S A232563 1,2,4,3,8,5,16,12,9,32,6,20,17,64,13,48,10,36,33,128,7,24,21,80,18,
%T A232563 68,65,256,14,52,49,192,11,40,37,144,34,132,129,512,28,25,96,22,84,81,
%U A232563 320,19,72,69,272,66,260,257,1024,15,56,53,208,50,196,193,768
%N A232563 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 4*x are in S, and duplicates are deleted as they occur.
%C A232563 Let S be the set of numbers defined by these rules:  1 is in S, and if x is in S, then x + 1 and 4*x are in S.  Then S is the set of all positive integers, which arise in generations.  Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2,4), g(3) = (3,8,5,16), g(4) = (12,9,32,6,20,17,64), etc.  Concatenating these gives A232563, a permutation of the positive integers.  The number of numbers in g(n) is A001631(n), the n-th tetranacci number.  It is helpful to show the results as a tree with the terms of S as nodes and edges from x to x + 1 if x + 1 has not already occurred, and an edge from x to 4*x if 4*x has not already occurred.
%H A232563 Clark Kimberling, <a href="/A232563/b232563.txt">Table of n, a(n) for n = 1..1000</a>
%e A232563 Each x begets x + 1 and 4*x, but if either has already occurred it is deleted.  Thus, 1 begets 2 and 4; in the next generation, 2 begets 3 and 8, and 4 begets 5 and 16.
%t A232563 z = 8; g[1] = {1}; g[2] = {2, 4}; g[n_] := Riffle[g[n - 1] + 1, 4 g[n - 1]]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232563 *)
%t A232563 Table[Length[g1[n]], {n, 1, z}]  (* A001631 *)
%t A232563 t1 = Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232564 *)
%Y A232563 Cf. A232559, A232564, A001631.
%K A232563 nonn,easy
%O A232563 1,2
%A A232563 _Clark Kimberling_, Nov 26 2013