Post Reply 
(38G) OEIS A065359: (Alternating Bit Sum) & Partial sums
08-10-2017, 08:07 AM (This post was last modified: 09-13-2017 12:21 PM by Gerald H.)
Post: #1
(38G) OEIS A065359: (Alternating Bit Sum) & Partial sums
A programme to insert symbolics in the Sequence App to reproduce the sequence

https://oeis.org/A065359

& its partial sums

https://oeis.org/A005536

Code:

A065359

RECURSE(U,N MOD 2-U1(U3(N)),1,-1)►U1(N):
CHECK 1:
RECURSE(U,U3(N)-IFTE(N MOD 2,2*U2(U3(N))-1,U2(U3(N))+U2(U3(N)-1)),1,0)►U2(N):
CHECK 2:
RECURSE(U,INT(N/2),0,1)►U3(N):
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)