Search: id:A005228 Results 1-1 of 1 results found. %I A005228 M2629 %S A005228 1,3,7,12,18,26,35,45,56,69,83,98,114,131,150,170,191,213,236,260,285, %T A005228 312,340,369,399,430,462,495,529,565,602,640,679,719,760,802,845,889,935, %U A005228 982,1030,1079,1129,1180,1232,1285,1339,1394,1451,1509,1568,1628,1689 %N A005228 Sequence and first differences (A030124) include all numbers exactly once. %C A005228 This is the lexicographically earliest sequence that together with its first differences (A030124) contain every positive integer exactly once. %D A005228 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A005228 E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris. %D A005228 D. Hofstadter, "Goedel, Escher, Bach", p. 73. %D A005228 Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4. %H A005228 T. D. Noe, Table of n, a(n) for n=1..1000 %H A005228 A. S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004. %H A005228 Catalin Francu, C++ program %H A005228 N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98). %H A005228 Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics. %H A005228 Index entries for sequences from "Goedel, Escher, Bach" %H A005228 Index entries for Hofstadter-type sequences %F A005228 a(n) = a(n-1) + c(n-1) for n >= 2, where a(1)=1, a( ) increasing, c( ) = complement of a( ) (c is the sequence A030124). %F A005228 Let a(n) = this sequence, b(n) = A030124 prefixed by 0. Then b(n) = mex{ a(i), b(i) : 0 <= i < n}, a(n) = a(n-1) + b(n) + 1. (Fraenkel) %F A005228 a(1) = 1, a(2) = 3; a( ) increasing; for n >= 3, if a(q) = a(n-1)-a(n-2)+1 for some q < n then a(n) = a(n-1) + (a(n-1)-a(n-2)+2), otherwise a(n) = a(n-1) + (a(n-1)-a(n-2)+1). - Albert Neumueller (albert.neu(AT)gmail.com), Jul 29 2006 %e A005228 Sequence reads 1 3 7 12 18 26 35 45..., %e A005228 differences are 2 4 5, 6, 8, 9, 10 ... and %e A005228 the point is every number not in the sequence itself appears among the differences. This property (together with the fact that both the sequence and the sequence of first differences are increasing) defines the sequence! %p A005228 maxn := 5000; h := array(1..5000); h[1] := 1; a := [1]; i := 1; b := []; for n from 2 to 1000 do if h[n] <> 1 then b := [op(b), n]; j := a[i]+n; if j < maxn then a := [op(a),j]; h[j] := 1; i := i+1; fi; fi; od: a; b; # a is A005228, b is A030124. %t A005228 a = {1}; d = 2; k = 1; Do[ While[ Position[a, d] != {}, d++ ]; k = k + d; d++; a = Append[a, k], {n, 1, 55} ]; a %Y A005228 Cf. A030124 (complement), A056731, A056738, A061577, A037257, A140778. %Y A005228 Sequence in context: A055998 A066379 A024517 this_sequence A000969 A122250 A024388 %Y A005228 Adjacent sequences: A005225 A005226 A005227 this_sequence A005229 A005230 A005231 %K A005228 nonn,easy,nice %O A005228 1,2 %A A005228 N. J. A. Sloane (njas(AT)research.att.com). %E A005228 Additional comments from Robert G. Wilson v (rgwv(AT)rgwv.com), Oct 24 2001 Search completed in 0.002 seconds