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 A245906 #22 Sep 08 2022 08:46:09 %S A245906 5,13,17,33,37,61,65,97,101,141,145,193,197,253,257,321,325,397,401, %T A245906 481,485,573,577,673,677,781,785,897,901,1021,1025,1153,1157,1293, %U A245906 1297,1441,1445,1597,1601,1761,1765,1933,1937,2113,2117,2301,2305,2497,2501,2701 %N A245906 Numbers of the form 4n^2 + 1 or 4n^2 + 8n + 1. %H A245906 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A245906 a(n) = n^2 + O(n). - _Charles R Greathouse IV_, Nov 20 2014 %F A245906 G.f.: x*(5+8*x-6*x^2+x^4)/((1+x)^2*(1-x)^3). [_Bruno Berselli_, Dec 02 2014] %F A245906 a(n) = (2*n*(n+5)-(2n+1)*(-1)^n+11)/2. [_Bruno Berselli_, Dec 02 2014] %t A245906 fn[n_]:=Module[{c=4n^2+1},{c,c+8n}]; Flatten[Array[fn,30]] (* or *) LinearRecurrence[{1,2,-2,-1,1},{5,13,17,33,37},60] (* _Harvey P. Dale_, May 21 2015 *) %o A245906 (PARI) list(lim)=Set(concat(vector(sqrtint((lim-1)\4),n,4*n^2+1), vector(sqrtint(lim\1+3)\2-1,n,4*n^2+8*n+1))) \\ _Charles R Greathouse IV_, Nov 13 2014 %o A245906 (PARI) a(n)=if(n%2,(n+1)^2+1,n^2+4*n+1) \\ _Charles R Greathouse IV_, Nov 20 2014 %o A245906 (Magma) [IsEven(n) select n^2+4*n+1 else (n+1)^2+1: n in [1..50]]; // _Bruno Berselli_, Dec 02 2014 %K A245906 nonn,easy %O A245906 1,1 %A A245906 _Jamel Ghanouchi_, Nov 13 2014 %E A245906 Extended by _Charles R Greathouse IV_, Nov 13 2014