login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A115638
A Jacobsthal-related divide-and-conquer sequence.
2
1, -1, 5, -1, -3, -1, 21, -1, -3, -1, -11, -1, -3, -1, 85, -1, -3, -1, -11, -1, -3, -1, -43, -1, -3, -1, -11, -1, -3, -1, 341, -1, -3, -1, -11, -1, -3, -1, -43, -1, -3, -1, -11, -1, -3, -1, -171, -1, -3, -1, -11, -1, -3, -1, -43, -1, -3, -1, -11, -1, -3, -1, 1365, -1, -3, -1, -11, -1, -3, -1, -43
OFFSET
0,3
COMMENTS
Partial sums are A115637.
LINKS
R. Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
FORMULA
G.f.: Sum_{k>=0} 4^k*x^(2^(k+1)-2)/(1+x^(2^k)); the g.f. G(x) satisfies G(x) - 4*x^2*G(x^2) = 1/(1+x).
a(0) = 1; for n >= 1, a(n) = A115637(n) - A115637(n-1). - Antti Karttunen, Nov 02 2018
MATHEMATICA
A115637[n_] := FromDigits[1 - IntegerDigits[n + 2, 2], 4];
Differences[Array[A115637, 100, -1]] (* Paolo Xausa, Jul 17 2024 *)
PROG
(PARI) A115638(n) = if(!n, 1, A115637(n)-A115637(n-1)); \\ (Needs also code from A115637) - Antti Karttunen, Nov 02 2018
(Python)
def A115638(n): return int(bin((~(n+2))^(-1<<(n+2).bit_length()))[2:], 4)-int(bin((~(n+1))^(-1<<(n+1).bit_length()))[2:], 4) # Chai Wah Wu, Jul 17 2024
CROSSREFS
Sequence in context: A348498 A206076 A329374 * A342375 A055515 A363437
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jan 27 2006
STATUS
approved