OFFSET
1,4
COMMENTS
I generalize the Ulam sequence by allowing any positive integer values (i and j) for the first two terms. Subsequent terms are all those integers which are a unique sum of two distinct earlier terms. In this sequence, a(n) is the number of distinct sequences (as defined by the first two terms) where 1 <= i < n-1 and i < j <= n-1.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, C program for A133139
EXAMPLE
a(10) = 12, since 10 occurs as a term in 12 different generalized Ulam sequences. The first two values of each are: (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) (1,9) (2,6) (2,8) (3,4) (3,7) (4,6). It does not occur in the sequence (1,2) which runs: 1, 2, 3, 4, 6, 8, 11...
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Richards, Sep 21 2007
EXTENSIONS
Spelling/notation corrections by Charles R Greathouse IV, Mar 18 2010
STATUS
approved