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.

A316742 Stepping through the Mersenne sequence (A000225) one step back, two steps forward.

This page as a plain text file.
%I A316742 #51 Sep 16 2018 07:00:34
%S A316742 1,0,3,1,7,3,15,7,31,15,63,31,127,63,255,127,511,255,1023,511,2047,
%T A316742 1023,4095,2047,8191,4095,16383,8191,32767,16383,65535,32767,131071,
%U A316742 65535,262143,131071,524287,262143,1048575,524287,2097151,1048575,4194303,2097151,8388607,4194303
%N A316742 Stepping through the Mersenne sequence (A000225) one step back, two steps forward.
%H A316742 Jim Singh and others, <a href="http://www.mersenneforum.org/showthread.php?t=23501">Fascinating periodic sequence pairs</a>, Mersenne Forum thread, July 2018.
%H A316742 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2).
%F A316742 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) for n>2, a(0)=1, a(1)=0, a(2)=3.
%F A316742 From _Bruno Berselli_, Jul 12 2018: (Start)
%F A316742 G.f.: (1 - x + x^2)/((1 - x)*(1 - 2*x^2)).
%F A316742 a(n) = 2*a(n-2) + 1 for n>1, a(0)=1, a(1)=0.
%F A316742 a(n) = (1 + (-1)^n)*(2^(n/2) - 2^((n-3)/2)) + 2^((n-1)/2) - 1.
%F A316742 Therefore: a(4*k) = 2*4^k - 1, a(4*k+1) = 4^k - 1, a(4*k+2) = 4^(k+1) - 1, a(4*k+3) = 2*4^k - 1. (End)
%e A316742 Let 1. The first four terms are 1, (1-1)/2 = 0, 2*1+1 = 3, 1.
%e A316742 Let 4*1+3 = 7. The next four terms are 7, (7-1)/2 = 3, 2*7+1 = 15, 7.
%e A316742 Let 4*7+3 = 31. The next four terms are 31, (31-1)/2 = 15, 2*31+1 = 63, 31; etc.
%p A316742 seq(coeff(series((1-x+x^2)/((1-x)*(1-2*x^2)), x,n+1),x,n),n=0..45); # _Muniru A Asiru_, Jul 14 2018
%t A316742 CoefficientList[Series[(1 - x + x^2)/((1 - x) (1 - 2 x^2)), {x, 0, 42}], x] (* _Michael De Vlieger_, Jul 13 2018 *)
%t A316742 LinearRecurrence[{1, 2, -2}, {1, 0, 3}, 46] (* _Robert G. Wilson v_, Jul 21 2018 *)
%o A316742 (GAP) a:=[1,0,3];; for n in [4..45] do a[n]:=a[n-1]+2*a[n-2]-2*a[n-3]; od; a; # _Muniru A Asiru_, Jul 14 2018
%Y A316742 Cf. A000225, A024036, A083420.
%K A316742 nonn,easy,less
%O A316742 0,3
%A A316742 _Jim Singh_, Jul 12 2018