cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A115638 A Jacobsthal-related divide-and-conquer sequence.

This page as a plain text file.
%I A115638 #19 Jul 18 2024 04:40:08
%S A115638 1,-1,5,-1,-3,-1,21,-1,-3,-1,-11,-1,-3,-1,85,-1,-3,-1,-11,-1,-3,-1,
%T A115638 -43,-1,-3,-1,-11,-1,-3,-1,341,-1,-3,-1,-11,-1,-3,-1,-43,-1,-3,-1,-11,
%U A115638 -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
%N A115638 A Jacobsthal-related divide-and-conquer sequence.
%C A115638 Partial sums are A115637.
%H A115638 Antti Karttunen, <a href="/A115638/b115638.txt">Table of n, a(n) for n = 0..1024</a>
%H A115638 R. Stephan, <a href="https://arxiv.org/abs/math/0307027">Divide-and-conquer generating functions. I. Elementary sequences</a>, arXiv:math/0307027 [math.CO], 2003.
%F A115638 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).
%F A115638 a(0) = 1; for n >= 1, a(n) = A115637(n) - A115637(n-1). - _Antti Karttunen_, Nov 02 2018
%t A115638 A115637[n_] := FromDigits[1 - IntegerDigits[n + 2, 2], 4];
%t A115638 Differences[Array[A115637, 100, -1]] (* _Paolo Xausa_, Jul 17 2024 *)
%o A115638 (PARI) A115638(n) = if(!n,1, A115637(n)-A115637(n-1)); \\ (Needs also code from A115637) - _Antti Karttunen_, Nov 02 2018
%o A115638 (Python)
%o A115638 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
%Y A115638 Cf. A001045, A115637.
%K A115638 easy,sign
%O A115638 0,3
%A A115638 _Paul Barry_, Jan 27 2006