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 A249356 #36 Sep 29 2019 15:09:44 %S A249356 1,17,33,49,65,97,129,161,193,241,289,337,385,449,513,577,641,721,801, %T A249356 881,961,1057,1153,1249,1345,1457,1569,1681,1793,1921,2049,2177,2305, %U A249356 2449,2593,2737,2881,3041,3201,3361,3521,3697,3873,4049,4225,4417,4609,4801 %N A249356 8*A200975(n)-7 where A200975 are the numbers on the diagonals in Ulam's spiral. %C A249356 All elements are odd. %C A249356 The pair (a(n), a(n+1)) is separated by A002265(n-1) elements in A158057. %H A249356 Todd Silvestri, <a href="/A249356/b249356.txt">Table of n, a(n) for n = 1..1000</a> %H A249356 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,0,1,-2,1). %F A249356 a(n) = 2*n*(n+2)+(-1)^n-4*sin((Pi*n)/2). %F A249356 G.f.: - x*(x^5-x^4+15*x+1)/((x-1)^3*(x^3+x^2+x+1)). %F A249356 a(n) = 2*a(n-1) - a(n-2) + 16 if n == 2 mod 4, a(n) = 2*a(n-1) - a(n-2) otherwise. - _Robert Israel_, Nov 04 2014 %F A249356 a(n) = 2*n*(n+2) - (1-(-1)^n)*(1-2*i^(n+1)) + 1, where i=sqrt(-1). - _Bruno Berselli_, Nov 18 2014 %p A249356 seq(2*n*(n+2)+(-1)^n-4*sin((Pi*n)/2), n=1..100); # _Robert Israel_, Nov 04 2014 %t A249356 a[n_Integer/;n>0]:=2 n (n+2)+(-1)^n-4 Mod[n^2 (3 n+2),4,-1] %t A249356 CoefficientList[Series[-(x^5 - x^4 + 15 x + 1) / ((x - 1)^3 (x^3 + x^2 + x + 1)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Nov 16 2014 *) %t A249356 Table[2 n (n + 2) - (1 - (-1)^n) (1 - 2 I^(n + 1)) + 1, {n, 1, 50}] (* _Bruno Berselli_, Nov 18 2014 *) %t A249356 LinearRecurrence[{2,-1,0,1,-2,1},{1,17,33,49,65,97},50] (* _Harvey P. Dale_, Sep 29 2019 *) %o A249356 (PARI) a(n) = 2*n*(n+2)+(-1)^n-4*round(sin((Pi*n)/2)) \\ _Charles R Greathouse IV_, Nov 17 2014 %K A249356 nonn,easy %O A249356 1,2 %A A249356 _Todd Silvestri_, Oct 27 2014