%I #41 Oct 23 2024 14:47:18
%S 0,1,2,3,34,93,180,295,438,609,808,1035,1290,1573,1884,2223,2590,2985,
%T 3408,3859,4338,4845,5380,5943,6534,7153,7800,8475,9178,9909,10668,
%U 11455,12270,13113,13984,14883,15810,16765,17748,18759,19798,20865,21960,23083
%N a(n) = (n-2)*(14*n-39) for n > 2, otherwise a(n) = n.
%C Union of [1, 2] and A195021.
%C Sequence found by reading the line from 0, in the direction 0, 1,..., in the Pythagorean spiral whose edges have length A195019 and whose vertices are the numbers A195020. This is the one of the semi-axis of the square spiral, which is related to the primitive Pythagorean triple [3, 4, 5].
%H Vincenzo Librandi, <a href="/A195030/b195030.txt">Table of n, a(n) for n = 0..1000</a>
%H Bruno Berselli, <a href="http://www.base5forum.it/upload/A195030.jpg">Illustration of initial terms: An origin of A195030</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: x*(1-x+30*x^3-2*x^4)/(1-x)^3. - _Bruno Berselli_, Oct 18 2011
%t Join[{0,1,2},Table[(n-2)*(14*n-39),{n,3,50}]] (* _Vincenzo Librandi_, Jul 10 2012 *)
%o (Magma) [0,1,2] cat[(n-2)*(14*n-39): n in [3..50]]; // _Vincenzo Librandi_, Jul 10 2012
%o (PARI) a(n)=if(n,([0,1,0; 0,0,1; 1,-3,3]^n*[0;1;2])[1,1],0) \\ _Charles R Greathouse IV_, Oct 16 2015
%Y Cf. A195019, A195020, A195021, A185019, A193053, A198017.
%K nonn,easy
%O 0,3
%A _Omar E. Pol_, Oct 18 2011
%E Both sequence (based on A195021) and definition suggested by _Bruno Berselli_, Oct 18 2011