login
A276584
The infinite trunk of greedy squares beanstalk with reversed subsections.
3
0, 3, 8, 6, 15, 11, 24, 21, 18, 35, 32, 27, 48, 43, 38, 63, 59, 56, 51, 80, 78, 74, 71, 66, 99, 95, 91, 88, 83, 120, 117, 114, 110, 107, 102, 143, 138, 135, 131, 128, 123, 168, 164, 161, 158, 154, 151, 146, 195, 192, 186, 183, 179, 176, 171, 224, 219, 213, 210, 206, 203, 198, 255, 251, 248, 242, 239, 235, 232, 227
OFFSET
0,2
LINKS
FORMULA
a(0) = 0; a(1) = 3; for n > 1, if A260740(a(n-1))+1 is not a square, then a(n) = A260740(a(n-1)), otherwise a(n) = A000290(2+A000196(A260740(a(n-1)))) - 1.
PROG
(Scheme)
(definec (A276584 n) (cond ((zero? n) n) ((= 1 n) 3) (else (let ((maybe_next (A260740 (A276584 (- n 1))))) (if (zero? (A010052 (+ 1 maybe_next))) maybe_next (+ -1 (A000290 (+ 2 (A000196 (+ 1 maybe_next))))))))))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 07 2016 and Sep 09 2016
STATUS
approved