OFFSET
0,3
COMMENTS
REFERENCES
Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.
LINKS
Antti Karttunen, Rows 0-31 of table, flattened
FORMULA
EXAMPLE
Rows 0 - 5 of the table are:
0
1
5, 7, 6
18, 61, 8, 11, 58, 28, 25
77, 246, 66, 55, 36, 237, 226, 35, 46, 116, 197, 115, 102
306, 985, 265, 445, 200, 155, 946, 905, 285, 220, 145, 475, 786, 925, 140, 185, 465, 395, 826, 460, 409
PROG
(Scheme);; with Antti Karttunen's IntSeq-library for memoizing definec-macro
;; Compare with the other definition for A218616:
(definec (A227452 n) (cond ((< n 2) n) ((A226062 (A227452 (- n 1))) => (lambda (next) (if (= next (A227452 (- n 1))) (A227451 (A227177 (+ 1 n))) next)))))
;; Alternative implementation using nested cached closures for function iteration:
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Antti Karttunen, Jul 12 2013
STATUS
approved