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 A005243 M0623 #49 Aug 04 2025 04:10:55 %S A005243 1,2,3,5,6,8,10,11,14,16,17,18,19,21,22,24,25,29,30,32,33,34,35,37,40, %T A005243 41,43,45,46,47,49,51,54,57,58,59,60,62,65,67,68,69,70,71,72,73,75,76, %U A005243 77,78,80,81,82,84,86,87,88,90,91,92,93,94,95,96,97,99,100 %N A005243 A self-generating sequence: start with 1 and 2, take all sums of any number of successive previous elements and adjoin them to the sequence. Repeat! %C A005243 Most of the natural numbers are members. Conjecture: there are infinitely many nonmembers. Is there an estimate for a(k)/k ? %C A005243 A118164(n) = number of representations of a(n) as sum of consecutive earlier terms. - _Reinhard Zumkeller_, Apr 13 2006 %D A005243 R. K. Guy, Unsolved Problems in Number Theory, E31. %D A005243 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A005243 T. D. Noe, <a href="/A005243/b005243.txt">Table of n, a(n) for n=1..1000</a> %H A005243 Thomas Bloom, <a href="https://www.erdosproblems.com/423">Problem 423</a>, Erdős Problems. %H A005243 D. R. Hofstadter, <a href="/A006336/a006336_1.pdf">Eta-Lore</a> [Cached copy, with permission] %H A005243 D. R. Hofstadter, <a href="/A006336/a006336_2.pdf">Pi-Mu Sequences</a> [Cached copy, with permission] %H A005243 D. R. Hofstadter and N. J. A. Sloane, <a href="/A006336/a006336.pdf">Correspondence, 1977 and 1991</a> %H A005243 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HofstadterSequences.html">Hofstadter Sequences.</a> %e A005243 After 1,2,3,5,6 you can adjoin 8 = 3+5, 10 = 2+3+5, etc. %e A005243 12 is not a term since it is not the sum of any set of consecutive previous terms. %t A005243 nmax = 200; For[ s = {1, 2}; n = 3, n <= nmax, n++, ls = Length[s]; tt = Total /@ Flatten[Table[s[[i ;; j]], {i, 1, ls-1}, {j, i+1, ls}], 1]; If[MemberQ[tt, n], AppendTo[s, n]]]; A005243 = s (* _Jean-François Alcover_, Oct 21 2016 *) %o A005243 (Haskell) %o A005243 import Data.Set (singleton, deleteFindMin, fromList, union, IntSet) %o A005243 a005243 n = a005243_list !! (n-1) %o A005243 a005243_list = 1 : h [1] (singleton 2) where %o A005243 h xs s = m : h (m:xs) (union s' $ fromList $ map (+ m) $ scanl1 (+) xs) %o A005243 where (m, s') = deleteFindMin s %o A005243 -- _Reinhard Zumkeller_, Dec 17 2015, Jun 22 2011 %Y A005243 Complement of A048973. %Y A005243 Cf. A118065, A118166. %K A005243 nonn,nice,easy %O A005243 1,2 %A A005243 D. R. Hofstadter, Jul 15 1977 %E A005243 More terms from _Jud McCranie_