login
A087873
a(n)=a(a(n-1))+a(n-a(n-1)) p(a(n))=n, b(n)=p(p(n-1))+a(n-a(n-1)).
1
1, 1, 6, 10, 10, 27, 18, 19, 22, 33, 34, 35, 36, 39, 40, 43, 49, 65, 66, 67, 68, 69, 72, 73, 74, 77, 78, 81, 87, 88, 91, 97, 107, 129, 130, 131, 132, 133, 134, 137, 138, 139, 140, 143, 144, 145, 148, 149, 152, 158, 159, 160, 163, 164, 167, 173, 174, 177, 183, 193
OFFSET
1,3
COMMENTS
The BASIC program implements a(n) = A188163(A188163(n-1))+a(abs(n-a(n-1))) , which does not work as soon as n=5, because a(5) appears at the left and at the right hand side of the equation. This also differs from the recurrence quoted in the NAME section. Another apparent source of confusion is that a(n) in the NAME is probably meant to read A004001(n). Perhaps (but this is not clear), the b(n) in the NAME was thought to define the current sequence, but a(n) = A188163(A188163(n-1)) + A004001(abs(n-A004001(n-1)) gives a different sequence. - R. J. Mathar, May 15 2013
PROG
(True BASIC)
70 DIM q0(0 to 4000)
71 let q0(0)=1
80 LET q0(1)=1
90 LET q0(2)=1
91 FOR n = 3 to 4000
92 LET q0(n)=q0(q0(n-1))+q0(n-q0(n-1))
93 NEXT n
100 SET MODE "color"
110 SET WINDOW 0, 1024, 0, 750
302 PRINT" by Roger L. Bagula "
303 DIM p(0 to 4000)
310 FOR x=0 to 4000
311 REM if p(q0(x)) hasn't been used already give p() a value
312 IF p(q0(x))=0 then LET p(q0(x))=x
320 NEXT x
330 DIM q1(0 to 4000)
331 let q1(0)=1
382 LET q1(1)=1
383 LET q1(2)=1
384 FOR n = 3 to 4000
385 LET q1(n)=p(p(n-1))+q1(abs(n-q1(n-1)))
386 NEXT n
387 OPEN #1: name "CM1:CRID_data", create newold, org text
390 FOR x=1 to 200
391 PRINT #1: q1(x); ", ";
392 PRINT q1(x);
393 NEXT x
394 CLOSE #1
460 END
CROSSREFS
Cf. A004001.
Sequence in context: A144394 A250742 A315122 * A284238 A284302 A284350
KEYWORD
nonn,obsc,uned,less
AUTHOR
Roger L. Bagula, Oct 11 2003
STATUS
approved