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!)
A259029 Partial sums of A259024. 3

%I #8 Sep 02 2023 03:40:11

%S 1,1,0,1,0,0,1,1,1,1,0,-1,0,0,1,2,1,1,2,1,0,0,-1,-1,0,0,0,1,0,0,1,1,2,

%T 2,1,1,2,2,1,1,0,0,1,0,0,0,-1,-2,-1,-1,0,1,0,0,1,1,0,0,-1,0,1,1,1,2,1,

%U 1,2,1,2,2,1,1,2,2,1,2,1,1,2,1,1,1,0

%N Partial sums of A259024.

%C |a(A259031(n))| = n and |a(m)| != n for m < A259031(n).

%H Reinhard Zumkeller, <a href="/A259029/b259029.txt">Table of n, a(n) for n = 1..10000</a>

%t f[p_, e_] := If[Mod[p, 6] == 1, 1, (-1)^e]; f[2, e_] := (1 + (-1)^e) / 2; f[3, 1] = -1; f[3, e_] := 0; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* _Amiram Eldar_, Sep 02 2023 *)

%o (Haskell)

%o a259029 n = a259029_list !! (n-1)

%o a259029_list = scanl1 (+) a259024_list

%Y Cf. A259024, A259031.

%K sign,easy

%O 1,16

%A _Reinhard Zumkeller_, Jun 17 2015

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 September 9 02:41 EDT 2024. Contains 375759 sequences. (Running on oeis4.)