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.

A099942 Start with 1, then alternately double or add 2.

This page as a plain text file.
%I A099942 #18 Sep 08 2022 08:45:15
%S A099942 1,2,4,8,10,20,22,44,46,92,94,188,190,380,382,764,766,1532,1534,3068,
%T A099942 3070,6140,6142,12284,12286,24572,24574,49148,49150,98300,98302,
%U A099942 196604,196606,393212,393214,786428,786430,1572860,1572862,3145724,3145726
%N A099942 Start with 1, then alternately double or add 2.
%H A099942 Vincenzo Librandi, <a href="/A099942/b099942.txt">Table of n, a(n) for n = 0..5000</a>
%H A099942 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-2).
%F A099942 a(0)=1; for n > 0, a(n) = a(n-1)*(1 + n mod 2) + 2*((n+1) mod 2).
%F A099942 G.f.: (2*x^3 + x^2 + 2*x + 1)/(2*x^4 - 3*x^2 + 1).
%F A099942 3*2^ceiling(n/2) + (-1)^n - 3. - _Ralf Stephan_, Dec 04 2004
%F A099942 a(2*n) = A033484(n).
%F A099942 a(n-1) + a(n) = A061776(n) for n > 0.
%F A099942 E.g.f.: -2*cosh(x) + 3*cosh(sqrt(2)*x) - 4*sinh(x) + 3*sqrt(2)*sinh(sqrt(2)*x). - _Franck Maminirina Ramaharo_, Nov 08 2018
%t A099942 LinearRecurrence[{0,3,0,-2},{1,2,4,8},50] (* _Harvey P. Dale_, May 03 2016 *)
%o A099942 (PARI) print1(a=1,",");for(n=1,20,print1(a=2*a,",",a=a+2,","))
%o A099942 (Magma) [3*2^Ceiling(n/2) + (-1)^n - 3: n in [0..50]]; // _Vincenzo Librandi_, Aug 17 2011
%Y A099942 Cf. A033484, A061776, A075427, A083416.
%K A099942 nonn,easy
%O A099942 0,2
%A A099942 _N. J. A. Sloane_, Nov 12 2004
%E A099942 Edited and extended by _Klaus Brockhaus_, Nov 13 2004