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.

A142954 a(n) = 2*n + 3 + 3*(-1)^n.

This page as a plain text file.
%I A142954 #34 Oct 01 2024 23:18:56
%S A142954 2,10,6,14,10,18,14,22,18,26,22,30,26,34,30,38,34,42,38,46,42,50,46,
%T A142954 54,50,58,54,62,58,66,62,70,66,74,70,78,74,82,78,86,82,90,86,94,90,98,
%U A142954 94,102,98,106,102,110,106,114,110
%N A142954 a(n) = 2*n + 3 + 3*(-1)^n.
%C A142954 First differences of A142717.
%H A142954 Vincenzo Librandi, <a href="/A142954/b142954.txt">Table of n, a(n) for n = 1..1000</a>
%H A142954 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A142954 a(2n+1) = A016825(n). a(2n) = A016825(n+1).
%F A142954 From _R. J. Mathar_, Oct 24 2008: (Start)
%F A142954 G.f.: 2*x*(1+4*x-3*x^2)/((1+x)*(1-x)^2). [corrected by _Jason Yuen_, Oct 01 2024]
%F A142954 a(n) = a(n-1)+a(n-2)-a(n-3) = 2*A097062(n+2). (End)
%p A142954 seq(2*n+3+3*(-1)^n,n=1..55); # _Muniru A Asiru_, Nov 01 2018
%t A142954 Table[2 n + 3 + 3 (-1)^n, {n, 1, 60}] (* _Vincenzo Librandi_, Apr 03 2013 *)
%t A142954 LinearRecurrence[{1,1,-1},{2,10,6},60] (* _Harvey P. Dale_, Aug 20 2015 *)
%o A142954 (Magma) I:=[2,10,6]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // _Vincenzo Librandi_, Apr 03 2013
%o A142954 (Python) for n in range(1,50): print(2*n+3+3*(-1)**n, end=', ') # _Stefano Spezia_, Nov 01 2018
%o A142954 (GAP) List([1..55],n->2*n+3+3*(-1)^n); # _Muniru A Asiru_, Nov 01 2018
%Y A142954 First differences of A214345.
%K A142954 nonn,easy
%O A142954 1,1
%A A142954 _Paul Curtz_, Sep 29 2008
%E A142954 Edited by _R. J. Mathar_, Oct 24 2008