OFFSET
1,3
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.
LINKS
G. C. Greubel, 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(a(n-1)) + a(n+1 -2*a(n-1)), with a(1) = a(2) = 1.
MATHEMATICA
a[1]=a[2]=1; a[n_]:= a[n]= a[a[n-1]] +a[n+1 -2*a[n-1]]; Table[a[n], {n, 80}]
PROG
(Sage)
@CachedFunction
def a(n): # A070868
if (n<3): return 1
else: return a(a(n-1)) + a(n+1 -2*a(n-1))
[a(n) for n in (1..90)] # G. C. Greubel, Mar 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 19 2002
EXTENSIONS
More terms from Robert G. Wilson v, May 20 2002
STATUS
approved