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.

A049963 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n-1 <= 2^(p+1), with a(1) = 1, a(2) = 2 and a(3) = 4.

This page as a plain text file.
%I A049963 #37 Feb 03 2023 01:34:13
%S A049963 1,2,4,9,25,43,93,220,617,1016,2039,4112,8401,17598,38292,90070,
%T A049963 252612,415156,830319,1660672,3321521,6643838,13290772,26595030,
%U A049963 53262532,106850150,214945816,434874798,889700788,1859656696
%N A049963 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n-1 <= 2^(p+1), with a(1) = 1, a(2) = 2 and a(3) = 4.
%C A049963 The number m in the definition of the sequence equals 2*n - 2 - x, where x is the smallest power of 2 >= n-1. It turns out that m = 1 + A006257(n-2), where the sequence b(n) = A006257(n) satisfies b(2*n) = 2*b(n) - 1 and b(2*n + 1) = 2*b(n) + 1, and it is related to the so-called Josephus problem. - _Petros Hadjicostas_, Sep 25 2019
%H A049963 <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F A049963 a(n) = a(1 + A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 4 with a(1) = 1, a(2) = 2 and a(3) = 4. - _Petros Hadjicostas_, Sep 25 2019
%e A049963 From _Petros Hadjicostas_, Sep 25 2019: (Start)
%e A049963 a(4) = a(1 + A006257(4-2)) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 9.
%e A049963 a(7) = a(1 + A006257(7-2)) + a(1) + a(2) + a(3) + a(4) + a(5) + a(6) = a(4) + a(1) + a(2) + a(3) + a(4) + a(5) + a(6) = 93.
%e A049963 (End)
%p A049963 a := proc(n) local i; option remember; if n < 4 then return [1, 2, 4][n]; end if; add(a(i), i = 1 .. n - 1) + a(2*n - 3 - Bits:-Iff(n - 2, n - 2)); end proc;
%p A049963 seq(a(n), n = 1..40); # _Petros Hadjicostas_, Sep 25 2019, courtesy of _Peter Luschny_
%Y A049963 Cf. A006257, A049920, A049939, A049960, A049964, A049979.
%Y A049963 Cf. A049914 (similar, but with minus a(m/2)), A049915 (similar, but with minus a(m)), A049962 (similar, but with plus a(m/2)).
%K A049963 nonn
%O A049963 1,2
%A A049963 _Clark Kimberling_
%E A049963 Name edited by _Petros Hadjicostas_, Sep 25 2019