cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A276624 The infinite trunk of ternary beanstalk with reversed subsections.

Original entry on oeis.org

0, 2, 8, 4, 26, 20, 16, 12, 10, 80, 72, 68, 62, 56, 52, 46, 42, 38, 34, 30, 28, 242, 232, 224, 216, 212, 204, 198, 194, 188, 180, 176, 170, 164, 160, 152, 144, 140, 134, 126, 122, 116, 110, 106, 100, 96, 92, 88, 84, 82, 728, 716, 706, 698, 688, 680, 672, 664, 656, 648, 644, 634, 626, 618, 610, 602, 594, 590, 582, 576, 572
Offset: 0

Views

Author

Antti Karttunen, Sep 11 2016

Keywords

Comments

See A276623.

Crossrefs

Programs

  • Scheme
    (definec (A276624 n) (cond ((zero? n) n) ((= n 1) 2) (else (let ((maybe_next (* 2 (A054861 (A276624 (- n 1)))))) (if (not (= 1 (A053735 (+ 1 maybe_next)))) maybe_next (+ -1 (A000244 (+ 1 (A081604 (+ 1 maybe_next))))))))))

Formula

a(0) = 0; a(1) = 2; for n > 1, if 2*A054861(a(n-1))+1 is not a power of 3, then a(n) = 2*A054861(a(n-1)), otherwise a(n) = A000244(1+A081604(1+2*A054861(a(n-1)))) - 1.