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 A065679 #27 Dec 28 2024 19:34:29 %S A065679 0,1,4,3,16,5,36,7,64,9,100,11,144,13,196,15,256,17,324,19,400,21,484, %T A065679 23,576,25,676,27,784,29,900,31,1024,33,1156,35,1296,37,1444,39,1600, %U A065679 41,1764,43,1936,45,2116,47,2304,49,2500,51,2704,53,2916,55,3136,57 %N A065679 If n is even, a(n) = n^2 else a(n) = n. %H A065679 Harry J. Smith, <a href="/A065679/b065679.txt">Table of n, a(n) for n = 0..1000</a> %H A065679 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1). %F A065679 a(n) = n^( (n+1) (mod 2) + 1 ). %F A065679 O.g.f.: x*(1+x^2)*(1+4*x-x^2)/(1-x^2)^3. - _Len Smiley_, Dec 05 2001 %F A065679 a(n) = A000217(n)+(-1)^n*A000217(n-1) with A000217(-1)=0. - _Bruno Berselli_, Jun 06 2013 %t A065679 Table[ n^ (Mod[n + 1, 2] + 1), {n, 0, 60} ] %o A065679 (PARI) a(n) = { if (n%2, n, n^2) } \\ _Harry J. Smith_, Oct 26 2009 %o A065679 (Magma) /* By the third formula: */ A000217:=func<i | i*(i+1)/2>; [A000217(n)+(-1)^n*A000217(n-1): n in [0..60]]; // _Bruno Berselli_, Jun 06 2013 %Y A065679 Cf. A000217, A065599, A016742 (bisection), A005408 (bisection). %Y A065679 Cf. A225144. %K A065679 nonn,easy %O A065679 0,3 %A A065679 _Robert G. Wilson v_, Dec 03 2001