OFFSET
1,3
COMMENTS
The first 71 terms are correct if the following conjecture is true: n+a(n)<=0 or n+a(n)>71 for n >= 2^30.
The sequence of negative terms begins: -11, -1, -261, -11, -253, -319, -341, -407, -451, -528, -329, -371, -29, -31, -649, -619, -427, -737, -37, ...
Indices of negative terms: 30, 56, 330, 616, 690, 870, 930, 1110, 1230, 1288, 1410, 1590, 1624, 1736, 1770, 1820, 1830, 2010, 2072, ...
Numbers n such that a(n)=n: 1, 4, 6, 7, 10, 11, 13, 15, 16, 23, 24, 25, 27, 28, 29, 31, 34, 36, 37, 39, 40, 41, 42, 43, 44, 45, ...
The sequence of numbers n such that n+a(n)<0 begins: 1485264, 2029290, 6156150, 6872250, 8338512, 8769090, 10420410, 13448490, 16654110, 25894770, ...
PROG
(Python)
TOP = 2**30 # if enough RAM
a = [1]*TOP
for n in range(1, TOP):
a[n]=n
for n in range(1, TOP):
if n+a[n]<TOP and n+a[n]>0: a[n+a[n]] -= a[n]
for n in range(1, 1000):
print(a[n], end=', ')
CROSSREFS
KEYWORD
sign
AUTHOR
Alex Ratushnyak, Nov 22 2013
EXTENSIONS
Corrected by Alex Ratushnyak, Dec 28 2013
STATUS
approved