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.

A065599 If n odd, a(n) = n^2 else a(n) = n.

This page as a plain text file.
%I A065599 #46 Dec 28 2024 19:34:32
%S A065599 0,1,2,9,4,25,6,49,8,81,10,121,12,169,14,225,16,289,18,361,20,441,22,
%T A065599 529,24,625,26,729,28,841,30,961,32,1089,34,1225,36,1369,38,1521,40,
%U A065599 1681,42,1849,44,2025,46,2209,48,2401,50,2601,52,2809,54,3025,56,3249
%N A065599 If n odd, a(n) = n^2 else a(n) = n.
%C A065599 a(n) = ABS(alternating sum of n-th row of the triangle in A176271), n>0. [_Reinhard Zumkeller_, Apr 13 2010]
%H A065599 Harry J. Smith, <a href="/A065599/b065599.txt">Table of n, a(n) for n = 0..1000</a>
%H A065599 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F A065599 a(n) = n^( n (mod 2) + 1 ).
%F A065599 O.g.f.: (x + 2*x^2 + 6*x^3 - 2*x^4 + x^5)/(1 - x^2)^3. - _Len Smiley_, Dec 04 2001
%F A065599 a(n) = A000217(n)-(-1)^n*A000217(n-1) with A000217(-1)=0. - _Bruno Berselli_, Jun 07 2013
%F A065599 a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - _Wesley Ivan Hurt_, Apr 26 2021
%F A065599 a(n) = n*((n+1)-(n-1)*(-1)^n)/2. - _Aaron J Grech_, Sep 03 2024
%F A065599 E.g.f.: x*(cosh(x) + (1 + x)*sinh(x)). - _Stefano Spezia_, Sep 26 2024
%t A065599 Table[ n^(Mod[n, 2] + 1), {n, 1, 60} ]
%t A065599 LinearRecurrence[{0,3,0,-3,0,1},{0,1,2,9,4,25},80] (* _Harvey P. Dale_, Sep 10 2017 *)
%o A065599 (PARI) a(n) = { if (n%2, n^2, n) } \\ _Harry J. Smith_, Oct 23 2009
%Y A065599 Cf. A000217, A176271.
%K A065599 nonn,easy
%O A065599 0,3
%A A065599 _George E. Antoniou_, Dec 01 2001