login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270814 a(1)=0; thereafter a(2k)=k+a(k), a(2k+1)=6k+4+a(6k+4). 3
0, 1, 46, 3, 31, 49, 281, 7, 330, 36, 248, 55, 106, 288, 679, 15, 197, 339, 500, 46, 127, 259, 610, 67, 633, 119, 101413, 302, 413, 694, 101073, 31, 808, 214, 505, 357, 498, 519, 2305, 66, 101290, 148, 1295, 281, 452, 633, 100932, 91, 757, 658, 1079, 145, 346, 101440, 102261, 330, 1596, 442, 2128 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Inspired by A266569.

In other words, a(n) = n/2 + a(n/2) if n even, a(n) = 3n+1+a(3n+1) if n odd.

From Seiichi Manyama, Apr 25 2016: (Start)

This sequence was inspired by the Collatz problem (A006577).

The Collatz rule is as follows: If n is even, divide it by 2, otherwise multiply it by 3 and add 1.

For example, starting with n = 3, one gets the sequence 3, 10, 5, 16, 8, 4, 2, 1. So a(3) = 10 + 5 + 16 + 8 + 4 + 2 + 1 = 46. (End) [Comment edited by N. J. A. Sloane, Apr 25 2016]

LINKS

Seiichi Manyama, Table of n, a(n) for n = 1..20000

Seiichi Manyama, Table of n, a(n) for n = 1..650289

MAPLE

A270814 := proc(n)

        local a, traj ;

        a := 0 ;

        traj := n ;

        while traj > 1 do

                if type(traj, 'even') then

                        traj := traj/2 ;

                else

                        traj := 3*traj+1 ;

                end if;

                a := a+traj ;

        end do:

        return a;

end proc:

[seq(A270814(n), n=1..60)];

CROSSREFS

Cf. A006577, A266569, A271473.

Sequence in context: A267319 A261513 A036204 * A284597 A286288 A051161

Adjacent sequences:  A270811 A270812 A270813 * A270815 A270816 A270817

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Apr 08 2016

EXTENSIONS

Typo in definition corrected by Gionata Neri, Apr 08 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 25 03:40 EST 2018. Contains 299630 sequences. (Running on oeis4.)