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 A125641 #72 Mar 17 2025 13:53:31 %S A125641 1,5,18,52,125,261,490,848,1377,2125,3146,4500,6253,8477,11250,14656, %T A125641 18785,23733,29602,36500,44541,53845,64538,76752,90625,106301,123930, %U A125641 143668,165677,190125,217186,247040,279873,315877,355250,398196,444925 %N A125641 Square of the (3,1)-entry of the 3 X 3 matrix M^n, where M = [1,0,0; 1,1,0; 1,i,1]. %C A125641 Conjecture [False!]: Draw the segments joining every lattice point on axis X with every lattice point on axis Y for 1 <= x <= n and 1 <= y <= n. The number of regions formed with these segments and axis X and Y is a(n). - _César Eliud Lozada_, Feb 14 2013 %C A125641 The above conjecture appears to be wrong. The number of regions formed by this construction is given in A332953, which differs from this sequence for n > 5. - _Scott R. Shannon_, Mar 04 2020 %H A125641 Vincenzo Librandi, <a href="/A125641/b125641.txt">Table of n, a(n) for n = 1..1000</a> %H A125641 César Eliud Lozada, <a href="/A125641/a125641_1.pdf">Counting regions</a> [Warning: Although the drawings here appear to be correct for n <= 5, the generalization to higher n fails - see Comment above and A332953. - _N. J. A. Sloane_, Mar 04 2020] %H A125641 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1). %F A125641 a(n) = |b(n)|^2, where b(n) = 3b(n-1) - 3b(n-2) + b(n-3) for n >= 4; b(1)=1, b(2)=2+i, b(3)=3+3i (the recurrence relation follows from the minimal polynomial t^3 - 3t^2 + 3t - 1 of the matrix M). %F A125641 a(n) = n^2*(n^2 - 2*n + 5)/4. - _T. D. Noe_, Feb 09 2007 %F A125641 O.g.f.: x*(1 + 3*x^2 + 2*x^3)/(1-x)^5. - _R. J. Mathar_, Dec 05 2007 %F A125641 a(n) = binomial(n,2)^2 + n^2, n > 1. - _Gary Detlefs_, Nov 23 2011 %F A125641 E.g.f.: x*(4 +6*x +4*x^2 +x^3)*exp(x)/4. - _G. C. Greubel_, Feb 22 2019 %e A125641 a(5)=25 because M^5 = [1,0,0; 5,1,0; 5+10i, 5i, 1] and |5+10i|^2 = 125. %p A125641 b[1]:=1: b[2]:=2+I: b[3]:=3+3*I: for n from 4 to 45 do b[n]:=3*b[n-1]-3*b[n-2]+b[n-3] od: seq(abs(b[j])^2,j=1..45); %p A125641 with(linalg): M[1]:=matrix(3,3,[1,0,0,1,1,0,1,I,1]): for n from 2 to 45 do M[n]:=multiply(M[1],M[n-1]) od: seq(abs(M[j][3,1])^2,j=1..45); %p A125641 seq(sum((binomial(n,m))^2,m=1..2),n=1..37); # _Zerinvary Lajos_, Jun 19 2008 %p A125641 # alternative Maple program: %p A125641 a:= n-> abs((<<1|0|0>, <1|1|0>, <1|I|1>>^n)[3,1])^2: %p A125641 seq(a(n), n=1..40); # _Alois P. Heinz_, Mar 09 2020 %t A125641 Table[n^2(n^2-2n+5)/4,{n,40}] (* _Vincenzo Librandi_, Feb 14 2012 *) %o A125641 (GAP) List([1..40],n-> n^2*(n^2-2*n+5)/4); # _Muniru A Asiru_, Feb 22 2019 %o A125641 (PARI) vector(40, n, n^2*(n^2-2*n+5)/4) \\ _G. C. Greubel_, Feb 22 2019 %o A125641 (Magma) [n^2*(n^2-2*n+5)/4: n in [1..40]]; // _G. C. Greubel_, Feb 22 2019 %o A125641 (Sage) [n^2*(n^2-2*n+5)/4 for n in (1..40)] # _G. C. Greubel_, Feb 22 2019 %Y A125641 Cf. A092098, A332953. %K A125641 nonn,easy %O A125641 1,2 %A A125641 _Gary W. Adamson_, Nov 28 2006 %E A125641 Edited by _Emeric Deutsch_, Dec 27 2006 %E A125641 Definition revised by _N. J. A. Sloane_, Mar 05 2020