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 A319384 #41 Mar 25 2025 17:03:44 %S A319384 1,5,9,21,29,49,61,89,105,141,161,205,229,281,309,369,401,469,505,581, %T A319384 621,705,749,841,889,989,1041,1149,1205,1321,1381,1505,1569,1701,1769, %U A319384 1909,1981,2129,2205,2361,2441,2605,2689,2861,2949,3129,3221,3409,3505,3701,3801,4005,4109,4321,4429,4649,4761,4989,5105,5341,5461 %N A319384 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), a(0)=1, a(1)=5, a(2)=9, a(3)=21, a(4)=29. %C A319384 The two bisections A136392(n+1)=1,9,29,61, ... and A201279(n)=5,21,49, ... are in the hexagonal spiral based on 2*n+1: %C A319384 . %C A319384 67--65--63--61 %C A319384 / \ %C A319384 69 33--31--29 59 %C A319384 / / \ \ %C A319384 71 35 11---9 27 57 %C A319384 / / / \ \ \ %C A319384 73 37 13 1 7 25 55 %C A319384 / / / / / / %C A319384 39 15 3---5 23 53 %C A319384 \ \ / / %C A319384 41 17--19--21 51 %C A319384 \ / %C A319384 43--45--47--49 %C A319384 . %C A319384 A201279(n) - A136892(n) = 20*n. %H A319384 Colin Barker, <a href="/A319384/b319384.txt">Table of n, a(n) for n = 0..1000</a> %H A319384 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A319384 a(2*n) = A136392(n+1), a(2*n+1) = A201279(n). %F A319384 a(-n) = a(n). %F A319384 a(2*n) + a(2*n+1) = 6*A001844(n). %F A319384 a(n) = (6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4. - _Wesley Ivan Hurt_, Oct 04 2018 %F A319384 G.f.: (1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2). - _Colin Barker_, Jun 05 2019 %F A319384 a(n) = A104585(n) + A032766(n+1). - _Alex W. Nowak_, Jan 08 2021 %t A319384 Table[(6 n^2 + 6 n + 5 - (2 n + 1)*(-1)^n)/4, {n, 0, 80}] (* _Wesley Ivan Hurt_, Jan 07 2021 *) %o A319384 (PARI) Vec((1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2) + O(x^50)) \\ _Colin Barker_, Jun 05 2019 %o A319384 (Magma) [(6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4 : n in [0..50]]; // _Wesley Ivan Hurt_, Jan 19 2021 %o A319384 (Python) %o A319384 def A319384(n): return (n*(3*n+4)+3 if n&1 else n*(3*n+2)+2)>>1 # _Chai Wah Wu_, Mar 25 2025 %Y A319384 Cf. A001844, A032766, A104585. %Y A319384 In the spiral: A003154(n+1), A080859, A126587, A136392, A201279, A227776. %Y A319384 Partial sums of A382154. %K A319384 nonn,easy %O A319384 0,2 %A A319384 _Paul Curtz_, Sep 18 2018 %E A319384 More terms from _N. J. A. Sloane_, Mar 23 2025