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.

A353265 Partial sums of A208981.

This page as a plain text file.
%I A353265 #29 Jun 20 2022 10:13:15
%S A353265 0,0,3,3,4,8,20,20,35,37,47,52,57,70,83,83,91,107,123,126,127,138,149,
%T A353265 155,174,180,287,301,315,329,431,431,453,462,471,488,505,522,552,556,
%U A353265 661,663,688,700,712,724,824,831,851,871,891,898,905,1013,1121,1136,1164,1179,1207,1222,1237,1340,1443,1443
%N A353265 Partial sums of A208981.
%H A353265 Paolo Xausa, <a href="/A353265/b353265.txt">Table of n, a(n) for n = 1..10000</a>
%H A353265 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%t A353265 Accumulate @ Table[-1 + Length @ NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, ! IntegerQ @ Log[2, #] &], {n, 1, 64}] (* _Amiram Eldar_, Apr 09 2022 *)
%o A353265 (PARI) ispow2(n)=n>>=valuation(n, 2); n==1;
%o A353265 f(n) = my(s); while(!ispow2(n), n=if(n%2, 3*n+1, n/2); s++); s; \\ A208981
%o A353265 a(n) = sum(i=1, n, f(i)); \\ _Michel Marcus_, Apr 13 2022
%Y A353265 Cf. A208981, A347270 (gives all 3x+1 sequences).
%Y A353265 Cf. A006370, A006877, A014682, A347272, A347519, A352907, A352908, A352939.
%K A353265 nonn
%O A353265 1,3
%A A353265 _Omar E. Pol_, Apr 09 2022