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.
%I A038608 #74 Aug 01 2024 18:05:12 %S A038608 0,-1,2,-3,4,-5,6,-7,8,-9,10,-11,12,-13,14,-15,16,-17,18,-19,20,-21, %T A038608 22,-23,24,-25,26,-27,28,-29,30,-31,32,-33,34,-35,36,-37,38,-39,40, %U A038608 -41,42,-43,44,-45,46,-47,48,-49,50,-51,52,-53,54,-55,56,-57,58,-59,60,-61,62,-63,64,-65 %N A038608 a(n) = n*(-1)^n. %C A038608 a(n) is the determinant of the (n+1) X (n+1) matrix with 0's in the main diagonal and 1's elsewhere. - _Franz Vrabec_, Dec 01 2007 %C A038608 Sum_{n>0} 1/a(n) = -log(2). - _Jaume Oliver Lafont_, Feb 24 2009 %C A038608 Pisano period lengths: 1, 2, 6, 4, 10, 6, 14, 8, 18, 10, 22, 12, 26, 14, 30, 16, 34, 18, 38, 20, ... (is this A066043?). - _R. J. Mathar_, Aug 10 2012 %C A038608 a(n) is the determinant of the (n+1) X (n+1) matrix whose i-th row, j-th column entry is the value of the cubic residue symbol ((j-i)/p) where p is a prime of the form 3k+2 and n < p. - _Ryan Wood_, Nov 09 2017 %C A038608 a(n-1) is the difference in the number of even minus odd parity derangements (permutations with no fixed points) in symmetric group S_n. - _Julian Hatfield Iacoponi_, Aug 01 2024 %H A038608 Vincenzo Librandi, <a href="/A038608/b038608.txt">Table of n, a(n) for n = 0..2000</a> %H A038608 Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a> %H A038608 László Németh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Nemeth/nemeth6.html">The trinomial transform triangle</a>, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also <a href="https://arxiv.org/abs/1807.07109">arXiv:1807.07109</a> [math.NT], 2018. %H A038608 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-1). %F A038608 G.f.: -x/(1+x)^2. %F A038608 E.g.f: -x*exp(-x). %F A038608 a(n) = -2*a(n-1) - a(n-2) for n >= 2. - _Jaume Oliver Lafont_, Feb 24 2009 %F A038608 a(n) = A003221(n+1)-A000387(n+1). - _Julian Hatfield Iacoponi_, Aug 01 2024 %p A038608 A038608 := n->n*(-1)^n; seq(A038608(n), n=0..100); %t A038608 Array[# (-1)^# &, 66, 0] (* _Michael De Vlieger_, Nov 18 2017 *) %t A038608 Table[If[EvenQ[n],n,-n],{n,0,70}] (* _Harvey P. Dale_, Jan 17 2022 *) %o A038608 (Magma) [n*(-1)^n: n in [0..80]]; // _Vincenzo Librandi_, Jun 08 2011 %o A038608 (PARI) a(n)=n*(-1)^n \\ _Charles R Greathouse IV_, Dec 07 2011 %o A038608 (Haskell) %o A038608 a038608 n = n * (-1) ^ n %o A038608 a038608_list = [0, -1] ++ map negate %o A038608 (zipWith (+) a038608_list (map (* 2) $ tail a038608_list)) %o A038608 -- _Reinhard Zumkeller_, Nov 24 2012 %o A038608 (Python) %o A038608 def A038608(n): return -n if n&1 else n # _Chai Wah Wu_, Nov 14 2022 %Y A038608 Cf. A002162 (log(2)). %Y A038608 Cf. A001477. %Y A038608 Cf. A003221, A000387 (even, odd derangements). %K A038608 sign,easy %O A038608 0,3 %A A038608 Vasiliy Danilov (danilovv(AT)usa.net), Jul 1998 %E A038608 Edited by _Frank Ellermann_, Jan 28 2002