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 A001856 M1112 N0425 #49 Jun 26 2017 22:59:36 %S A001856 1,2,4,8,16,21,42,51,102,112,224,235,470,486,972,990,1980,2002,4004, %T A001856 4027,8054,8078,16156,16181,32362,32389,64778,64806,129612,129641, %U A001856 259282,259313,518626,518658,1037316,1037349,2074698,2074734,4149468 %N A001856 A self-generating sequence: every positive integer occurs as a(i)-a(j) for a unique pair i,j. %C A001856 This is a B_2 sequence. More economical recursion: a(1)=1, a(2n)=2a(2n-1), a(2n+1)=a(2n)+r(n), where r(n) is the smallest positive integer not of the form a(j)-a(i) with 1<=i<j<=2n; gives the sequence: 1, 2, 4, 8, 13, 26, 34, ... which also grows exponentially. Effective optimization of this method, giving a sequence of polynomial growth, is proposed in A247556. - _Thomas Ordowski_, Sep 28 2014 %D A001856 R. K. Guy, Unsolved Problems in Number Theory, E25. %D A001856 W. Sierpiński, Elementary Theory of Numbers. Państ. Wydaw. Nauk., Warsaw, 1964, p. 444. %D A001856 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001856 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001856 T. D. Noe, <a href="/A001856/b001856.txt">Table of n, a(n) for n = 1..1000</a> %H A001856 R. L. Graham, <a href="http://www.jstor.org/stable/2313995">Problem E1910</a>, Amer. Math. Monthly, 73 (1966), 775. %H A001856 R. K. Guy, <a href="http://www.jstor.org/stable/2691503">The Second Strong Law of Small Numbers</a>, Math. Mag, 63 (1990), no. 1, 3-20. %H A001856 R. K. Guy, <a href="/A005347/a005347.pdf">The Second Strong Law of Small Numbers</a>, Math. Mag, 63 (1990), no. 1, 3-20. [Annotated scanned copy] %H A001856 R. K. Guy and N. J. A. Sloane, <a href="/A005180/a005180.pdf">Correspondence</a>, 1988. %H A001856 M. Hall, <a href="http://dx.doi.org/10.1215/S0012-7094-47-01482-8">Cyclic projective planes</a>, Duke Math. J., 4 (1947), 1079-1090. %H A001856 C. B. A. Peck, <a href="http://www.jstor.org/stable/2315138">Remark on Problem E1910</a>, Amer. Math. Monthly, 75 (1968), 80-81. %H A001856 W. Sierpiński, <a href="http://matwbn.icm.edu.pl/kstresc.php?tom=42&wyd=10">Elementary Theory of Numbers</a>, Warszawa 1964. %H A001856 N. J. A. Sloane, <a href="/A001149/a001149.pdf">Handwritten notes on Self-Generating Sequences, 1970</a> (note that A1148 has now become A005282) %F A001856 a(1)=1, a(2)=2, a(2n+1) = 2a(2n), a(2n+2) = a(2n+1) + r(n), where r(n) = smallest positive number not of form a(j) - a(i) with 1 <= i < j <= 2n+1. %t A001856 a[1] = 1; a[2] = 2; a[n_?OddQ] := a[n] = 2*a[n-1]; a[n_?EvenQ] := a[n] = a[n-1] + r[(n-2)/2]; r[n_] := ( diff = Table[a[j] - a[i], {i, 1, 2*n+1}, {j, i+1, 2*n+1}] // Flatten // Union; max = diff // Last; notDiff = Complement[Range[max], diff]; If[notDiff == {}, max+1, notDiff // First]); Table[a[n], {n, 1, 39}] (* _Jean-François Alcover_, Dec 31 2012 *) %Y A001856 Cf. A054540, A004978, A247556. %K A001856 nonn,easy,nice %O A001856 1,2 %A A001856 _N. J. A. Sloane_ %E A001856 More terms from Larry Reeves (larryr(AT)acm.org), Sep 14 2000