login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276486 a(1)=1, a(2)=2; thereafter, denoting x=a(n-1)+a(n-2), we have a(n)=3x+1 if x is odd, otherwise a(n)=x/2^m where 2^m is the maximal power of 2 dividing x. 1
1, 2, 10, 3, 40, 130, 85, 646, 2194, 355, 7648, 24010, 15829, 119518, 406042, 65695, 1415212, 4442722, 2928967, 22115068, 75132106, 48623587, 371267080, 1259672002, 815469541, 6225424630, 21122682514, 3418513393, 73623587722, 231126303346, 76187472767, 921941328340 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Apparently for initial values (1,2) the sequence is unbounded. What about other initial values?
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..2632
EXAMPLE
a=1,b=2: x=1+2=3, x is odd hence a(3)=3x+1=10;
a=2,b=10: x=2+10=12, x is even hence a(4)=x/2^2=3;
a=10, b=3: x=10+3=13, x is odd hence a(5)=3x+1=40, etc.
MATHEMATICA
a=1; b=2; s={a, b}; Do[y=If[OddQ[x=a+b], 3*x+1, x/2^IntegerExponent[x, 2]]; AppendTo[s, y]; a=b; b=y, {30}]; s
PROG
(PARI) first(n)=if(n<3, return(vector(n, i, i))); my(v=vector(n), x); v[1]=1; v[2]=2; for(k=3, n, x=v[k-2]+v[k-1]; v[k]=if(x%2, 3*x+1, x>>valuation(x, 2))); v \\ Charles R Greathouse IV, Sep 05 2016
CROSSREFS
Sequence in context: A245062 A120862 A153273 * A341363 A234932 A332701
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Sep 05 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)