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!)
A353265 Partial sums of A208981. 3
0, 0, 3, 3, 4, 8, 20, 20, 35, 37, 47, 52, 57, 70, 83, 83, 91, 107, 123, 126, 127, 138, 149, 155, 174, 180, 287, 301, 315, 329, 431, 431, 453, 462, 471, 488, 505, 522, 552, 556, 661, 663, 688, 700, 712, 724, 824, 831, 851, 871, 891, 898, 905, 1013, 1121, 1136, 1164, 1179, 1207, 1222, 1237, 1340, 1443, 1443 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MATHEMATICA
Accumulate @ Table[-1 + Length @ NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, ! IntegerQ @ Log[2, #] &], {n, 1, 64}] (* Amiram Eldar, Apr 09 2022 *)
PROG
(PARI) ispow2(n)=n>>=valuation(n, 2); n==1;
f(n) = my(s); while(!ispow2(n), n=if(n%2, 3*n+1, n/2); s++); s; \\ A208981
a(n) = sum(i=1, n, f(i)); \\ Michel Marcus, Apr 13 2022
CROSSREFS
Cf. A208981, A347270 (gives all 3x+1 sequences).
Sequence in context: A019466 A111573 A049854 * A366758 A291872 A195978
KEYWORD
nonn
AUTHOR
Omar E. Pol, Apr 09 2022
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 April 29 15:45 EDT 2024. Contains 372114 sequences. (Running on oeis4.)