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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109738 a(0)=1; for n>0, a(n) = a(n-1) S prime(n), where S is + if n is odd and a(n-1) is even, x if n is odd and a(n-1) is odd, - if n is even and a(n-1) is even, + if n is even and a(n-1) is odd. 1

%I

%S 1,2,-1,-5,2,13,26,43,62,85,114,145,182,223,266,313,366,425,486,553,

%T 624,697,776,859,948,1045,1146,1249,1356,1465,1578,1705,1836,1973,

%U 2112,2261,2412,2569,2732,2899,3072,3251,3432,3623,3816,4013,4212,4423,4646,4873

%N a(0)=1; for n>0, a(n) = a(n-1) S prime(n), where S is + if n is odd and a(n-1) is even, x if n is odd and a(n-1) is odd, - if n is even and a(n-1) is even, + if n is even and a(n-1) is odd.

%t f[l_] := Append[l, Apply[{Subtract, Plus, Plus, Times}[[2*Mod[Length[l], 2] + Mod[Last[l], 2] + 1]], {Last[l], Prime[Length[l]]}]]; Nest[f, {1}, 50] (* _Ray Chandler_ *)

%Y A corrected version of A109623.

%K sign

%O 0,2

%A _N. J. A. Sloane_, following a communication from Harry Yang (yexing_yang(AT)msn.com), Aug 11 2005

%E Extended by _Ray Chandler_ and _Robert G. Wilson v_, Aug 12 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 08:49 EDT 2019. Contains 325155 sequences. (Running on oeis4.)