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.

A103528 a(n) = Sum_{k = 1..n-1 such that n == k (mod 2^k)} 2^(k-1).

This page as a plain text file.
%I A103528 #38 Apr 26 2024 07:07:27
%S A103528 0,0,1,0,1,2,1,0,1,2,5,0,1,2,1,0,1,2,5,8,1,2,1,0,1,2,5,0,1,2,1,0,1,2,
%T A103528 5,8,17,2,1,0,1,2,5,0,1,2,1,0,1,2,5,8,1,2,1,0,1,2,5,0,1,2,1,0,1,2,5,8,
%U A103528 17,34,1,0,1,2,5,0,1,2,1,0,1,2,5,8,1,2,1,0,1,2,5,0,1,2,1,0,1,2,5,8
%N A103528 a(n) = Sum_{k = 1..n-1 such that n == k (mod 2^k)} 2^(k-1).
%C A103528 Is there a simpler closed form?
%H A103528 Robert Israel, <a href="/A103528/b103528.txt">Table of n, a(n) for n = 1..10000</a>
%H A103528 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].
%H A103528 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Sloane/sloane300.html">Sloping binary numbers: a new sequence related to the binary numbers</a>, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
%F A103528 a(n) = (A102371(n) + n)/2 - 2^(n-1). - _Philippe Deléham_, Mar 27 2005
%F A103528 G.f.: Sum_{k>=1} 2^(k-1) x^(k+2^k)/(1 - x^(2^k)). - _Robert Israel_, Jan 21 2017
%F A103528 Conjecture: a(n) = (b(n) - b(n-1) - 1)/2 for n > 1 where b(n) = Sum_{k=0..A000523(n)} c(n-k, k) and c(n, m) = n - (n mod 2^m) with a(1) = 0. - _Mikhail Kurkov_, Jun 01 2022
%p A103528 f:=proc(n) local t1,k; t1:=0; for k from 1 to n-1 do if n mod 2^k = k then t1:=t1+2^(k-1); fi; od: t1; end;
%t A103528 (* b = A102371 (using _Alex Ratushnyak_'s code) *)
%t A103528 b[n_] := b[n] = If[n == 1, 1, BitXor[b[n-1], b[n-1] + n]];
%t A103528 a[n_] := (b[n] + n)/2 - 2^(n-1);
%t A103528 Array[a, 100] (* _Jean-François Alcover_, Apr 11 2019, after _Philippe Deléham_ *)
%o A103528 (PARI) a(n) = sum(k = 1, n-1, if ((n % 2^k) == k, 2^(k-1))); \\ _Michel Marcus_, May 06 2020
%Y A103528 Cf. A102371.
%K A103528 nonn,look
%O A103528 1,6
%A A103528 _N. J. A. Sloane_, Mar 22 2005