The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A140106 Number of noncongruent diagonals in a regular n-gon. 23

%I #52 Sep 18 2023 15:39:16

%S 0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,

%T 14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,

%U 26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,35,36,36,37

%N Number of noncongruent diagonals in a regular n-gon.

%C Number of double-stars (diameter 3 trees) with n nodes. For n >= 3, number of partitions of n-2 into two parts. - _Washington Bomfim_, Feb 12 2011

%C Number of roots of the n-th Bernoulli polynomial in the left half-plane. - _Michel Lagneau_, Nov 08 2012

%C From _Gus Wiseman_, Oct 17 2020: (Start)

%C Also the number of 3-part non-strict integer partitions of n - 1. The Heinz numbers of these partitions are given by A285508. The version for partitions of any length is A047967, with Heinz numbers A013929. The a(4) = 1 through a(15) = 6 partitions are (A = 10, B = 11, C = 12):

%C 111 211 221 222 322 332 333 433 443 444 544 554

%C 311 411 331 422 441 442 533 552 553 644

%C 511 611 522 622 551 633 661 662

%C 711 811 722 822 733 833

%C 911 A11 922 A22

%C B11 C11

%C (End)

%H G. C. Greubel, <a href="/A140106/b140106.txt">Table of n, a(n) for n = 1..5000</a>

%H Washington Bomfim, <a href="http://oeis.org/wiki/File:Ff2.png">Double-star corresponding to the partition [3,7]</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%H <a href="/index/Tra#trees">Index entries for sequences related to trees</a>

%F a(n) = floor((n-2)/2), for n > 1, otherwise 0. - _Washington Bomfim_, Feb 12 2011

%F G.f.: x^4/(1-x-x^2+x^3). - _Colin Barker_, Jan 31 2012

%F a(n) = floor(A129194(n-1)/A022998(n)), for n > 1. - _Paul Curtz_, Jul 23 2017

%F a(n) = A001399(n-3) - A001399(n-6). Compare to A007997(n) = A001399(n-3) + A001399(n-6). - _Gus Wiseman_, Oct 17 2020

%e The square (n=4) has two congruent diagonals; so a(4)=1. The regular pentagon also has congruent diagonals; so a(5)=1. Among all the diagonals in a regular hexagon, there are two noncongruent ones; hence a(6)=2, etc.

%p with(numtheory): for n from 1 to 80 do:it:=0:

%p y:=[fsolve(bernoulli(n,x) , x, complex)] : for m from 1 to nops(y) do : if Re(y[m])<0 then it:=it+1:else fi:od: printf(`%d, `,it):od:

%t a[1]=0; a[n_?OddQ] := (n-3)/2; a[n_] := n/2-1; Array[a, 100] (* _Jean-François Alcover_, Nov 17 2015 *)

%o (PARI) a(n)=if(n>1,n\2-1,0) \\ _Charles R Greathouse IV_, Oct 16 2015

%o (Magma)

%o A140106:= func< n | n eq 1 select 0 else Floor((n-2)/2) >;

%o [A140106(n): n in [1..80]]; // _G. C. Greubel_, Feb 10 2023

%o (SageMath)

%o def A140106(n): return 0 if (n==1) else (n-2)//2

%o [A140106(n) for n in range(1,81)] # _G. C. Greubel_, Feb 10 2023

%o (Python)

%o def A140106(n): return n-2>>1 if n>1 else 0 # _Chai Wah Wu_, Sep 18 2023

%Y Cf. A000554, A007304, A007997, A013929, A022998.

%Y Cf. A047967, A129194, A235451, A285508, A321773.

%Y A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.

%Y Essentially the same as A004526.

%K nonn,easy

%O 1,6

%A _Andrew McFarland_, Jun 03 2008

%E More terms from _Joseph Myers_, Sep 05 2009

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 May 15 02:15 EDT 2024. Contains 372536 sequences. (Running on oeis4.)