OFFSET
1,3
COMMENTS
Behaves erratically (see linked picture).
There is a similar sequence with a(1)=2.
REFERENCES
G. Balzarotti and P. P. Lava, 103 curiosità matematiche, Hoepli, 2010, p. 276.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
Paolo P. Lava, Graph of the first 600 terms of the sequence
John A. Pelesko, Generalizing the Conway-Hofstadter $10,000 Sequence, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.5.
Klaus Pinn, A Chaotic Cousin Of Conway's Recursive Sequence, arXiv:cond-mat/9808031, 1998.
FORMULA
a(n) = (1/2)*((1-signum(abs(b(n))-n))*b(n)+(1+signum(abs(b(n))-n))*a(n-1)), with a(1)=1 and b(n)=1+a(n-1-(n mod a(n-1)))-(-1)^n*a(n-1).
EXAMPLE
a(1)=1.
b(2)=signum(abs(1+(2-1-(2 mod 1))-(-1)^2*1)-2)=signum(abs(1+1-1)-2)=-1.
a(2)=(1/2)*(1+1)*1+(1/2)*(1-1)*1=1+0=1.
MAPLE
P:=proc(i) local a, n; a:=array(1..50000); a[1]:=1; print(a[1]); for n from 2 by 1 to i do a[n]:=1/2*(1-signum(abs(1+a[n-1-(n mod (a[n-1]))]-(-1)^n*a[n-1])-n))*(1+a[n-1-(n mod (a[n-1]))]-(-1)^n*a[n-1])+1/2*(1+signum(abs(1+a[n-1-(n mod (a[n-1]))]-(-1)^n*a[n-1])-n))*a[n-1]; print(a[n]); od; end: P(10000);
CROSSREFS
KEYWORD
sign,look
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Apr 30 2010
EXTENSIONS
Entries and formula corrected by Paolo P. Lava, May 04 2010
a(3) corrected by N. J. A. Sloane, Oct 02 2010
STATUS
approved