login
A286577
If n = 3k-1 then a(n) = a(k), otherwise a(n) = n.
2
0, 1, 1, 3, 4, 1, 6, 7, 3, 9, 10, 4, 12, 13, 1, 15, 16, 6, 18, 19, 7, 21, 22, 3, 24, 25, 9, 27, 28, 10, 30, 31, 4, 33, 34, 12, 36, 37, 13, 39, 40, 1, 42, 43, 15, 45, 46, 16, 48, 49, 6, 51, 52, 18, 54, 55, 19, 57, 58, 7, 60, 61, 21, 63, 64, 22, 66, 67, 3, 69, 70, 24, 72, 73, 25, 75, 76, 9, 78, 79, 27, 81, 82, 28, 84, 85, 10, 87, 88, 30, 90
OFFSET
0,4
LINKS
FORMULA
If n = 3k-1 then a(n) = a(k), otherwise a(n) = n.
PROG
(Scheme) (define (A286577 n) (if (= 2 (modulo n 3)) (A286577 (/ (+ 1 n) 3)) n))
CROSSREFS
Cf. A000265, A007051 (gives the positions of ones), A286578.
Sequence in context: A132179 A089029 A131226 * A175323 A359268 A255604
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 2017
STATUS
approved