A059100
a(n) = n^2 + 2.
Original entry on oeis.org
2, 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502, 2603
Offset: 0
For n = 2, a(2) = 6 since there are 6 election results in a 4-candidate, 2-voter election that have candidates c1 and c2 tied. Letting <i,j> denote voter 1 voting for candidate i and voter 2 voting for candidate j, the six election results are <1,2>, <2,1>, <3,3>, <3,4>, <4,3>, and <4,4>. - _Dennis P. Walsh_, May 08 2013
- Harry J. Smith, Table of n, a(n) for n = 0..1000
- Yurii S. Bystryk, Vitalii L. Denysenko, and Volodymyr I. Ostryk, Lune and Lens Sequences, ResearchGate preprint, 2024. See pp. 52, 56.
- Hesam Dashti, A New Upper Bound on the Length of Shortest Permutation Strings; An Algorithm for Generating Permutation Strings, arXiv:1009.5053 [math.CO], 2010. - _Jonathan Vos Post_, Sep 28 2010
- Guo-Niu Han, Enumeration of Standard Puzzles, 2011. [Cached copy]
- Guo-Niu Han, Enumeration of Standard Puzzles, arXiv:2006.14070 [math.CO], 2020.
- Alexander Soifer, Coffee Hour and the Conway-Soifer Cover-Up, In: How Does One Cut a Triangle? (2009), pp. 147-156. See also here
- Dennis P. Walsh, Notes on a tied election.
- Eric Weisstein's World of Mathematics, Dipyramidal Graph.
- Eric Weisstein's World of Mathematics, Gear Graph.
- Eric Weisstein's World of Mathematics, Matching.
- Eric Weisstein's World of Mathematics, Maximum Independent Edge Set.
- Eric Weisstein's World of Mathematics, Near-Square Prime.
- Eric Weisstein's World of Mathematics, Pappus Chain.
- Eric Weisstein's World of Mathematics, Wiener Index.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Cf.
A000032,
A000196,
A000290,
A001541,
A002522,
A005248,
A008865,
A056105,
A056109,
A056899,
A057076,
A069987,
A081908,
A114964,
A156798,
A166464.
Apart from initial terms, same as
A010000.
-
a059100 = (+ 2) . (^ 2)
a059100_list = scanl (+) (2) [1, 3 ..]
-- Reinhard Zumkeller, Feb 09 2015
-
with(combinat, fibonacci):seq(fibonacci(3, i)+1, i=0..49); # Zerinvary Lajos, Mar 20 2008
-
Table[n^2 + 2, {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, Dec 15 2008 *)
LinearRecurrence[{3, -3, 1}, {2, 3, 6}, 50] (* Vincenzo Librandi, Feb 15 2012 *)
Range[0, 20]^2 + 2 (* Eric W. Weisstein, Dec 31 2017 *)
CoefficientList[Series[(-2 + 3 x - 3 x^2)/(-1 + x)^3, {x, 0, 20}], x] (* Eric W. Weisstein, Dec 31 2017 *)
-
a(n) = { n^2+2 } \\ Harry J. Smith, Jun 24 2009
-
[lucas_number1(3,n,-2) for n in range(0, 50)] # Zerinvary Lajos, May 16 2009
A107348
Triangle read by rows: T(m,n) = number of different lines in a rectangular m X n array of points with integer coordinates (x,y): 0 <= x <= m, 0 <= y <= n.
Original entry on oeis.org
0, 1, 6, 1, 11, 20, 1, 18, 35, 62, 1, 27, 52, 93, 140, 1, 38, 75, 136, 207, 306, 1, 51, 100, 181, 274, 405, 536, 1, 66, 131, 238, 361, 534, 709, 938, 1, 83, 164, 299, 454, 673, 894, 1183, 1492, 1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306
Offset: 0
Triangle begins
0,
1, 6,
1, 11, 20,
1, 18, 35, 62,
1, 27, 52, 93, 140,
1, 38, 75, 136, 207, 306,
1, 51, 100, 181, 274, 405, 536,
1, 66, 131, 238, 361, 534, 709, 938,
1, 83, 164, 299, 454, 673, 894, 1183, 1492,
1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306,
...
- M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh, On the minimal teaching sets of two-dimensional threshold functions, SIAM J. Disc. Math. 29(1), 2015, pp. 157-165.
- Les Reid, Problem #7: How Many Lines Does the Lattice of Points Generate?, Problems from the 04-05 academic year, Challenge Archive, Missouri State University's Problem Corner.
-
VR := proc(m,n,q) local a,i,j; a:=0;
for i from -m+1 to m-1 do for j from -n+1 to n-1 do
if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
LL:=(m,n)->(VR(m,n,1)-VR(m,n,2))/2;
for m from 1 to 12 do lprint([seq(LL(m,n),n=1..m)]); od: # N. J. A. Sloane, Feb 10 2020
-
VR[m_, n_, q_] := Sum[If[GCD[i, j] == q, (m - Abs[i])(n - Abs[j]), 0], {i, -m + 1, m - 1}, {j, -n + 1, n - 1}];
LL[m_, n_] := (1/2)(VR[m, n, 1] - VR[m, n, 2]);
Table[LL[m, n], {m, 1, 10}, {n, 1, m}] // Flatten (* Jean-François Alcover, Jun 04 2023, after N. J. A. Sloane *)
T(3,3) corrected and sequence extended by
R. J. Mathar, Dec 17 2017
A160842
Number of lines through at least 2 points of a 2 X n grid of points.
Original entry on oeis.org
0, 1, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502
Offset: 0
-
[0,1] cat [n^2 + 2: n in [2..100]]; // G. C. Greubel, Apr 30 2018
-
a[n_]:=If[n<2,n,n^2+2] Table[a[n],{n,0,50}]
Join[{0,1},Range[2,50]^2+2] (* Harvey P. Dale, Feb 06 2015 *)
-
Vec(-x*(2*x^3-4*x^2+3*x+1) / (x-1)^3 + O(x^100)) \\ Colin Barker, May 24 2015
A160850
Number of lines through at least 2 points of a 10 X n grid of points.
Original entry on oeis.org
0, 1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306, 2757, 3298, 3857, 4506, 5159, 5868, 6603, 7428, 8255, 9172, 10105, 11098, 12101, 13194, 14305, 15496, 16697, 17964, 19251, 20628, 21997, 23456, 24941, 26492, 28053, 29688, 31341, 33084
Offset: 0
-
m=10;
a[0]=0; a[1]=1;
a[2]=m^2+2;
a[3]=2*m^2+3-Mod[m,2];
a[n_]:=a[n]=2*a[n-1]-a[n-2]+2*p1[m,n]+2*p4[m,n]
p1[m_,n_]:=Sum[p2[m,n,y], {y,1,m-1}]
p2[m_,n_,y_]:=If[GCD[y,n-1]==1,m-y,0]
p[i_]:=If[i>0,i,0]
p2[m_,n_,x_,y_]:=p2[m,n,x,y]=(n-x)*(m-y)-p[n-2*x]*p[m-2*y]
p3[m_,n_,x_,y_]:=p2[m,n,x,y]-2*p2[m,n-1,x,y]+p2[m,n-2,x,y]
p4[m_,n_]:=p4[m,n]=If[Mod[n,2]==0,0,p42[m,n]]
p42[m_,n_]:=p42[m,n]=Sum[p43[m,n,y], {y,1,m-1}]
p43[m_,n_,y_]:=If[GCD[(n-1)/2,y]==1,p3[m,n,(n-1)/2,y],0]
Table[a[n],{n,0,39}]
A160843
Number of lines through at least 2 points of a 3 X n grid of points.
Original entry on oeis.org
0, 1, 11, 20, 35, 52, 75, 100, 131, 164, 203, 244, 291, 340, 395, 452, 515, 580, 651, 724, 803, 884, 971, 1060, 1155, 1252, 1355, 1460, 1571, 1684, 1803, 1924, 2051, 2180, 2315, 2452, 2595, 2740, 2891, 3044, 3203, 3364, 3531, 3700, 3875, 4052, 4235, 4420
Offset: 0
-
[0, 1] cat [2*n^2 + 3 - n mod 2: n in [2..100]]; // G. C. Greubel, Apr 30 2018
-
a[n_]:=If[n<2,n,2*n^2+3-Mod[n,2]] Table[a[n],{n,0,47}]
Join[{0, 1}, LinearRecurrence[{2, 0, -2, 1}, {11, 20, 35, 52}, 20]] (* G. C. Greubel, Apr 30 2018 *)
-
Vec(-x*(3*x^4-3*x^3-2*x^2+9*x+1)/((x-1)^3*(x+1)) + O(x^100)) \\ Colin Barker, May 24 2015
A160844
Number of lines through at least 2 points of a 4 X n grid of points.
Original entry on oeis.org
0, 1, 18, 35, 62, 93, 136, 181, 238, 299, 370, 445, 532, 621, 722, 827, 942, 1061, 1192, 1325, 1470, 1619, 1778, 1941, 2116, 2293, 2482, 2675, 2878, 3085, 3304, 3525, 3758, 3995, 4242, 4493, 4756, 5021, 5298, 5579, 5870, 6165, 6472, 6781, 7102, 7427, 7762
Offset: 0
-
I:=[18, 35, 62, 93, 136, 181]; [0,1] cat [n le 6 select I[n] else Self(n-1) +Self(n-2) -Self(n-4) -Self(n-5) +Self(n-6): n in [1..30]]; // G. C. Greubel, Apr 30 2018
-
a[0]=0; a[1]=1; a[2]=18; a[3]=35; a[n_]:=a[n]=a[n]=2*a[n-1]-a[n-2]+R[n] c4={10,4,12,2,12,4}; R[n_]:=c4[[Mod[n+2,6]+1]] Table[a[n],{n,0,46}]
Join[{0,1}, LinearRecurrence[{1,1,0,-1,-1,1}, {18, 35, 62, 93, 136, 181}, 50]] (* G. C. Greubel, Apr 30 2018 *)
-
my(x='x+O('x^30)); concat([0], Vec(x*(4*x^6-3*x^4+9*x^3+16*x^2+ 17*x+1 )/((1-x)^3*(x+1)*(x^2+x+1)))) \\ G. C. Greubel, Apr 30 2018
A160845
Number of lines through at least 2 points of a 5 X n grid of points.
Original entry on oeis.org
0, 1, 27, 52, 93, 140, 207, 274, 361, 454, 563, 676, 809, 944, 1099, 1258, 1433, 1614, 1815, 2016, 2237, 2464, 2707, 2954, 3221, 3490, 3779, 4072, 4381, 4696, 5031, 5366, 5721, 6082, 6459, 6840, 7241, 7644, 8067, 8494, 8937, 9386, 9855, 10324, 10813
Offset: 0
-
m=5;
a[0]=0; a[1]=1;
a[2]=m^2+2;
a[3]=2*m^2+3-Mod[m,2];
a[n_]:=a[n]=2*a[n-1]-a[n-2]+2*p1[m,n]+2*p4[m,n]
p1[m_,n_]:=Sum[p2[m,n,y], {y,1,m-1}]
p2[m_,n_,y_]:=If[GCD[y,n-1]==1,m-y,0]
p[i_]:=If[i>0,i,0]
p2[m_,n_,x_,y_]:=p2[m,n,x,y]=(n-x)*(m-y)-p[n-2*x]*p[m-2*y]
p3[m_,n_,x_,y_]:=p2[m,n,x,y]-2*p2[m,n-1,x,y]+p2[m,n-2,x,y]
p4[m_,n_]:=p4[m,n]=If[Mod[n,2]==0,0,p42[m,n]]
p42[m_,n_]:=p42[m,n]=Sum[p43[m,n,y], {y,1,m-1}]
p43[m_,n_,y_]:=If[GCD[(n-1)/2,y]==1,p3[m,n,(n-1)/2,y],0]
Table[a[n],{n,0,44}]
A160848
Number of lines through at least 2 points of an 8 X n grid of points.
Original entry on oeis.org
0, 1, 66, 131, 238, 361, 534, 709, 938, 1183, 1470, 1759, 2104, 2459, 2870, 3287, 3740, 4209, 4734, 5261, 5844, 6437, 7070, 7711, 8408, 9115, 9872, 10637, 11444, 12265, 13142, 14015, 14944, 15889, 16876, 17871, 18914, 19967, 21076, 22193, 23352
Offset: 0
-
m=8;
a[0]=0; a[1]=1;
a[2]=m^2+2;
a[3]=2*m^2+3-Mod[m,2];
a[n_]:=a[n]=2*a[n-1]-a[n-2]+2*p1[m,n]+2*p4[m,n]
p1[m_,n_]:=Sum[p2[m,n,y], {y,1,m-1}]
p2[m_,n_,y_]:=If[GCD[y,n-1]==1,m-y,0]
p[i_]:=If[i>0,i,0]
p2[m_,n_,x_,y_]:=p2[m,n,x,y]=(n-x)*(m-y)-p[n-2*x]*p[m-2*y]
p3[m_,n_,x_,y_]:=p2[m,n,x,y]-2*p2[m,n-1,x,y]+p2[m,n-2,x,y]
p4[m_,n_]:=p4[m,n]=If[Mod[n,2]==0,0,p42[m,n]]
p42[m_,n_]:=p42[m,n]=Sum[p43[m,n,y], {y,1,m-1}]
p43[m_,n_,y_]:=If[GCD[(n-1)/2,y]==1,p3[m,n,(n-1)/2,y],0]
Table[a[n],{n,0,40}]
A160849
Number of lines through at least 2 points of a 9 X n grid of points.
Original entry on oeis.org
0, 1, 83, 164, 299, 454, 673, 894, 1183, 1492, 1855, 2218, 2653, 3102, 3623, 4148, 4719, 5310, 5973, 6638, 7375, 8124, 8923, 9730, 10609, 11502, 12459, 13424, 14443, 15478, 16585, 17686, 18859, 20052, 21299, 22554, 23869, 25198, 26599, 28008
Offset: 0
-
m=9;
a[0]=0; a[1]=1;
a[2]=m^2+2;
a[3]=2*m^2+3-Mod[m,2];
a[n_]:=a[n]=2*a[n-1]-a[n-2]+2*p1[m,n]+2*p4[m,n]
p1[m_,n_]:=Sum[p2[m,n,y], {y,1,m-1}]
p2[m_,n_,y_]:=If[GCD[y,n-1]==1,m-y,0]
p[i_]:=If[i>0,i,0]
p2[m_,n_,x_,y_]:=p2[m,n,x,y]=(n-x)*(m-y)-p[n-2*x]*p[m-2*y]
p3[m_,n_,x_,y_]:=p2[m,n,x,y]-2*p2[m,n-1,x,y]+p2[m,n-2,x,y]
p4[m_,n_]:=p4[m,n]=If[Mod[n,2]==0,0,p42[m,n]]
p42[m_,n_]:=p42[m,n]=Sum[p43[m,n,y], {y,1,m-1}]
p43[m_,n_,y_]:=If[GCD[(n-1)/2,y]==1,p3[m,n,(n-1)/2,y],0]
Table[a[n],{n,0,39}]
Showing 1-9 of 9 results.
Comments