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.

A135492 Number of ways to toss a coin n times and not get a run of five.

This page as a plain text file.
%I A135492 #20 May 22 2025 08:23:40
%S A135492 1,2,4,8,16,30,58,112,216,416,802,1546,2980,5744,11072,21342,41138,
%T A135492 79296,152848,294624,567906,1094674,2110052,4067256,7839888,15111870,
%U A135492 29129066,56148080,108228904,208617920,402123970,775118874,1494089668,2879950432
%N A135492 Number of ways to toss a coin n times and not get a run of five.
%H A135492 G. C. Greubel, <a href="/A135492/b135492.txt">Table of n, a(n) for n = 0..1000</a>
%H A135492 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1,1).
%F A135492 a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4).
%F A135492 a(n) = 2*A000078(n+3) for n>=1.
%F A135492 G.f.: 1-2*x*(x+1)*(1+x^2)/(x^4+x^3+x^2+x-1). - _Colin Barker_, Jun 12 2012
%t A135492 a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]; a[1] = 2; a[2] = 4; a[3] = 8; a[4] = 16; Array[a, 33] (* _Robert G. Wilson v_, Feb 10 2008 *)
%t A135492 LinearRecurrence[{1, 1, 1, 1}, {2, 4, 8, 16}, 25] (* _G. C. Greubel_, Oct 15 2016 *)
%o A135492 (PARI) a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,1,1,1]^(n-1)*[2;4;8;16])[1,1] \\ _Charles R Greathouse IV_, Oct 17 2016
%Y A135492 Cf. A135491, A135493.
%K A135492 nonn,easy
%O A135492 0,2
%A A135492 James R FitzSimons (cherry(AT)getnet.net), Feb 07 2008
%E A135492 Corrected and extended by _Robert G. Wilson v_, Feb 10 2008
%E A135492 a(0)=1 prepended by _Alois P. Heinz_, May 22 2025