OFFSET
1,2
COMMENTS
Presumably this is the lexicographically earliest sequence of distinct positive numbers with the property that sums of two or three consecutive earlier terms are excluded. - N. J. A. Sloane, Jan 07 2021
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E30.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime Number of Measurement.
PROG
(Haskell)
import Data.List ((\\))
a005242 n = a005242_list !! (n-1)
a005242_list = f [1..] 0 0 where
f (x:xs) y z = x : f (xs \\ [x + y, x + y + z]) x y
-- Reinhard Zumkeller, May 23 2013
(Python)
import itertools
def a005242_gen():
terms, forbidden = [1, 2], {3}
yield from terms
while True:
for c in itertools.count(terms[-1] + 1):
if c not in forbidden:
break
yield c
terms.append(c)
forbidden.add(terms[-1] + terms[-2])
forbidden.add(terms[-1] + terms[-2] + terms[-3])
a005242_list = list(itertools.islice(a005242_gen(), 30))
# Adam Reichert, May 31 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Jud McCranie, Feb 15 1997
Name clarified from comment by N. J. A. Sloane, Jan 07 2021. - Adam Reichert, May 31 2026
STATUS
approved
