OFFSET
1,3
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Nick Hobson, Python program for this sequence
Eric Weisstein's World of Mathematics, Wolfram Sequences
FORMULA
a(n) = a(n-1 - a(n-1)) + a(n-1 - a(n-2)), with a(1) = a(2) = 1.
MATHEMATICA
a[1]=a[2]=1; a[n_]:= a[n]= a[n-1 -a[n-1]] + a[n-1 -a[n-2]]; Table[a[n], {n, 80}]
PROG
(Haskell)
a070867 n = a070867_list !! (n-1)
a070867_list = 1 : 1 : zipWith (+)
(map a070867 $ zipWith (-) [2..] a070867_list)
(map a070867 $ zipWith (-) [2..] $ tail a070867_list)
-- Reinhard Zumkeller, May 31 2013
(Sage)
@CachedFunction
def a(n): # A070867
if (n<3): return 1
else: return a(n-1 -a(n-1)) + a(n-1 -a(n-2))
[a(n) for n in (1..80)] # G. C. Greubel, Mar 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 19 2002
EXTENSIONS
More terms from John W. Layman, May 21 2002
Erroneous comma in sequence corrected by Nick Hobson, Feb 17 2007
STATUS
approved