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.

A075487 Length of iteration list when Collatz-function is iterated with initial value 1+3^n.

Original entry on oeis.org

2, 3, 7, 19, 111, 22, 96, 33, 76, 75, 43, 135, 134, 133, 132, 144, 205, 129, 190, 140, 95, 94, 261, 428, 91, 258, 394, 331, 255, 254, 390, 389, 388, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 501, 500, 450, 498, 497, 752, 495, 494, 493, 748, 491, 746, 489
Offset: 0

Views

Author

Labos Elemer, Sep 26 2002

Keywords

Comments

n=2, 1+3^n = 10, list = {10,5,16,8,4,2,1}, so a(2)=7

Crossrefs

Programs

  • Mathematica
    coll[n_]:=Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]; coll /@ (3^Range[0, 60] + 1) (* Harvey P. Dale, Dec 15 2014 *)

Formula

a(n) = A008908(3^n+1).