OFFSET
0,2
COMMENTS
Also a reverse Collatz sequence with odd numbers. - Paul Conradi, Oct 23 2020
Odd numbers in A225570. - Michel Marcus, Oct 24 2020
LINKS
Michel Marcus, Table of n, a(n) for n = 0..295
FORMULA
If a(n-1) == 1 (mod 3) then a(n) = (4*a(n-1)-1)/3 or (16*a(n-1)-1)/3, whichever value is not divisible by 3.
If a(n-1) == -1 (mod 3) then a(n) = (2*a(n-1)-1)/3 or a(n)=(8*a(n-1)-1)/3, whichever value is not divisible by 3.
EXAMPLE
a(0)=1, a(1)=5 by definition, then a(2) = (2*5-1)/3 or (8*5-1)/3; as (2*5-1)/3 is divisible by 3, a(2) = (8*5-1)/3 = 13.
PROG
(PARI) lista(nn) = {print1(1, ", ", 5); x = 5; for (n = 2, nn, if(x%3 == 1, x = (4*x-1)/3, x = (2*x-1)/3); if(x%3 == 0, x = 4*x + 1); print1(", ", x)); } \\ Jinyuan Wang, Sep 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Sep 20 2019
EXTENSIONS
More terms from Jinyuan Wang, Sep 21 2019
STATUS
approved