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.

A058633 Partial sums of A006577.

This page as a plain text file.
%I A058633 #12 Oct 01 2024 12:19:37
%S A058633 0,1,8,10,15,23,39,42,61,67,81,90,99,116,133,137,149,169,189,196,203,
%T A058633 218,233,243,266,276,387,405,423,441,547,552,578,591,604,625,646,667,
%U A058633 701,709,818,826,855,871,887,903,1007,1018,1042,1066,1090,1101,1112,1224
%N A058633 Partial sums of A006577.
%H A058633 Charles R Greathouse IV, <a href="/A058633/b058633.txt">Table of n, a(n) for n = 1..10000</a>
%F A058633 a(n) = Sum_{i=0..n} A006577(i).
%e A058633 a(3) = A006577(1) + A006577(2) + A006577(3) = 0 + 1 + 7 = 8.
%t A058633 A006577[n_] := Length[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, # > 1 &]] - 1;
%t A058633 Accumulate[Array[A006577, 100]] (* _Paolo Xausa_, Oct 01 2024 *)
%o A058633 (PARI) A006577(n)=if(n<0, 0, s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c)
%o A058633 s=0; vector(100,n, s+=A006577(n) ) \\ _Charles R Greathouse IV_, May 11 2015
%Y A058633 Cf. A006577, A058633.
%K A058633 nonn
%O A058633 1,3
%A A058633 Felix Goldberg (felixg(AT)tx.technion.ac.il), Dec 26 2000