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!)
A257971 First differences of A006921. 3
0, 2, -1, 5, -2, 8, -5, 21, -8, 34, -21, 81, -34, 128, -81, 337, -128, 546, -337, 1301, -546, 2056, -1301, 5381, -2056, 8706, -5381, 20737, -8706, 32768, -20737, 86273, -32768, 139778, -86273, 333061, -139778, 526344, -333061, 1377557, -526344, 2228770 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(2*n) = - A168081(n), a(2*n+1) = A168081(n+2);
a(2*n+4) = - a(2*n+1).
PROG
(Haskell)
a257971 n = a257971_list !! n
a257971_list = zipWith (-) (tail a006921_list) a006921_list
(Python)
def A257971(n): return sum(int(not r & ~(n+2-r))*2**(n//2+1-r) for r in range(n//2+2)) if n & 1 else -sum(int(not r & ~(n-1-r))*2**(n//2-1-r) for r in range(n//2)) # Chai Wah Wu, Jun 20 2022
CROSSREFS
Sequence in context: A014682 A167160 A111361 * A205377 A082010 A318972
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Jul 14 2015
STATUS
approved

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 April 24 07:54 EDT 2024. Contains 371922 sequences. (Running on oeis4.)