login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320577 Number of isosceles triangles whose vertices are the vertices of a regular n-gon. 2
1, 4, 10, 8, 21, 24, 30, 40, 55, 52, 78, 84, 95, 112, 136, 132, 171, 180, 196, 220, 253, 248, 300, 312, 333, 364, 406, 400, 465, 480, 506, 544, 595, 588, 666, 684, 715, 760, 820, 812, 903, 924, 960, 1012, 1081, 1072, 1176, 1200, 1241, 1300, 1378, 1368, 1485 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,2
COMMENTS
Inspired by question 12 of the Turkish National Mathematics Olympics 2015 (see the link).
LINKS
Turkish Math Olympiad 2015 Question 12
FORMULA
a(n) = n*(n-1)/2 if n mod 6 = 1 or 5 n*(n-2)/2 if n mod 6 = 2 or 4 n*(3n-7)/6 if n mod 6 = 3 n*(3n-10)/6 otherwise.
Alternatively, with the least absolute modulo 'mods' and m = abs(mods(n, 6)), a(n) = n*(n - k)/2 where k = m if m in {1, 2} and otherwise k = (10 - m)/3. - Peter Luschny, Oct 20 2018
From Colin Barker, Oct 17 2018: (Start)
G.f.: x^3*(1 + 5*x + 13*x^2 + 11*x^3 + 5*x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x + x^2)^2).
a(n) = -a(n-1) + a(n-2) + 3*a(n-3) + 2*a(n-4) - 2*a(n-5) - 3*a(n-6) - a(n-7) + a(n-8) + a(n-9) for n>11.
(End)
MAPLE
a := proc(n) local m; m := abs(mods(n, 6));
if m = 0 or m = 3 then m := (10 - m)/3 fi; n*(n - m)/2 end:
seq(a(n), n=3..100); # Peter Luschny, Oct 20 2018
MATHEMATICA
a[n_]:=If[Mod[n, 6]==1 || Mod[n, 6]==5, Binomial[n, 2], If[Mod[n, 6]==2 || Mod[n, 6]==4, n*(n-2)/2 , If[Mod[n, 6]==3, n*(3n-7)/6 , n*(3n-10)/6 ]]]; Array[a, 20, 3] (* Stefano Spezia, Oct 16 2018 *)
PROG
(Python)
for n in range(3, 101):
m = n % 6
if m == 1 or m == 5: a = (n*(n-1)) // 2
elif m==2 or m == 4: a = (n*(n-2)) // 2
elif m==3 : a = (n*(3*n-7)) // 6
else : a = (n*(3*n-10)) // 6
print(a, end=", ")
(PARI) Vec(x^3*(1 + 5*x + 13*x^2 + 11*x^3 + 5*x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x + x^2)^2) + O(x^40)) \\ Colin Barker, Oct 17 2018
CROSSREFS
Sequence in context: A070295 A123483 A073722 * A199805 A053248 A081547
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)