login
a(0)=1. Let S = string of digits of a(0),a(1),a(2),... To get a(n+1) (n>=0), subtract next element of S from a(n) if that would give a positive number, otherwise add it to a(n).
5

%I #17 Apr 11 2014 00:13:11

%S 1,2,4,8,16,15,9,8,3,12,4,1,2,4,8,7,5,1,9,2,7,6,15,13,6,12,11,6,5,2,8,

%T 7,5,4,3,9,4,2,10,3,8,4,1,10,6,4,3,3,6,14,10,9,8,8,2,6,3,6,12,11,7,6,

%U 6,15,7,15,13,7,4,10,9,7,6,5,12,6,12,11,6,13

%N a(0)=1. Let S = string of digits of a(0),a(1),a(2),... To get a(n+1) (n>=0), subtract next element of S from a(n) if that would give a positive number, otherwise add it to a(n).

%D Eric Angelini, Posting to Sequence Fans Mailing List, Mar 06 2012

%H Alois P. Heinz, <a href="/A210025/b210025.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>

%e 1.2.4.8.16.15.9.8.3.12.4.1.2.4.8.7.5.1.9.2.7.6.15.13.6.12.11.6.5.2.8.7.5.... <- a(0), a(1), ...

%e .1.2.4.8..1..6.1.5.9..8.3.1.2.4.1.2.4.8.7.5.1.9..2..7.6..1..5.1.3.6.1.2.... <- S

%Y Cf. A005132, A210026 (for S), A210022, A210023.

%K nonn,base,easy

%O 0,2

%A _N. J. A. Sloane_, Mar 16 2012

%E More terms from _Alois P. Heinz_, Aug 17 2012