OFFSET
1,2
COMMENTS
Most of the natural numbers are members. Conjecture: there are infinitely many nonmembers. Is there an estimate for a(k)/k ?
A118164(n) = number of representations of a(n) as sum of consecutive earlier terms. - Reinhard Zumkeller, Apr 13 2006
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E31.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
Thomas Bloom, Problem 423, Erdős Problems.
D. R. Hofstadter, Eta-Lore [Cached copy, with permission]
D. R. Hofstadter, Pi-Mu Sequences [Cached copy, with permission]
D. R. Hofstadter and N. J. A. Sloane, Correspondence, 1977 and 1991
Eric Weisstein's World of Mathematics, Hofstadter Sequences.
EXAMPLE
After 1,2,3,5,6 you can adjoin 8 = 3+5, 10 = 2+3+5, etc.
12 is not a term since it is not the sum of any set of consecutive previous terms.
MATHEMATICA
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 *)
PROG
(Haskell)
import Data.Set (singleton, deleteFindMin, fromList, union, IntSet)
a005243 n = a005243_list !! (n-1)
a005243_list = 1 : h [1] (singleton 2) where
h xs s = m : h (m:xs) (union s' $ fromList $ map (+ m) $ scanl1 (+) xs)
where (m, s') = deleteFindMin s
-- Reinhard Zumkeller, Dec 17 2015, Jun 22 06 2011
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
D. R. Hofstadter, Jul 15 1977
EXTENSIONS
More terms from Jud McCranie
STATUS
approved