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 A206399 #38 Nov 29 2024 18:30:52 %S A206399 1,43,166,371,658,1027,1478,2011,2626,3323,4102,4963,5906,6931,8038, %T A206399 9227,10498,11851,13286,14803,16402,18083,19846,21691,23618,25627, %U A206399 27718,29891,32146,34483,36902,39403,41986,44651,47398,50227,53138,56131,59206,62363,65602 %N A206399 a(0) = 1; for n > 0, a(n) = 41*n^2 + 2. %C A206399 Apart from the first term, numbers of the form (r^2 + 2*s^2)*n^2 + 2 = (r*n)^2 + (s*n - 1)^2 + (s*n + 1)^2: in this case is r = 3, s = 4. After 1, all terms are in A000408. %H A206399 Bruno Berselli, <a href="/A206399/b206399.txt">Table of n, a(n) for n = 0..1000</a> %H A206399 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %F A206399 O.g.f.: (1 + x)*(1 + 39*x + x^2)/(1 - x)^3. %F A206399 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 4. - _Wesley Ivan Hurt_, Dec 18 2020 %F A206399 E.g.f.: exp(x)*(41*x^2 + 41*x + 2) - 1. - _Elmo R. Oliveira_, Nov 29 2024 %t A206399 Join[{1}, 41 Range[39]^2 + 2] %t A206399 CoefficientList[Series[(1 + x) (1 + 39 x + x^2) / (1 - x)^3, {x, 0, 40}], x] (* _Vincenzo Librandi_, Aug 18 2013 *) %o A206399 (Magma) [n eq 0 select 1 else 41*n^2+2: n in [0..39]]; %o A206399 (Magma) I:=[1,43,166,371]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..41]]; // _Vincenzo Librandi_, Aug 18 2013 %o A206399 (PARI) a(n)=if(n,41*n^2+2,1) \\ _Charles R Greathouse IV_, Sep 24 2015 %Y A206399 Sequences of the same type: A005893, A005897, A005899, A005901, A005903, A005905, A005914, A005918, A005919, A008527, A010000-A010023. %Y A206399 Cf. A000408. %K A206399 nonn,easy %O A206399 0,2 %A A206399 _Bruno Berselli_, Feb 07 2012