cp's OEIS Frontend

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.

A102302 Largest number < n/2 coprime to n.

Original entry on oeis.org

3, 3, 4, 3, 5, 5, 6, 5, 7, 7, 8, 7, 9, 9, 10, 9, 11, 11, 12, 11, 13, 13, 14, 13, 15, 15, 16, 15, 17, 17, 18, 17, 19, 19, 20, 19, 21, 21, 22, 21, 23, 23, 24, 23, 25, 25, 26, 25, 27, 27, 28, 27, 29, 29, 30, 29, 31, 31, 32, 31, 33, 33, 34, 33, 35, 35, 36, 35, 37, 37, 38, 37, 39, 39
Offset: 7

Views

Author

Hugo Pfoertner, Jan 23 2005

Keywords

Comments

The densest possible star-shaped regular n-gon is formed by connecting with straight lines every a(n)-th point out of n regularly spaced points lying on a circumference.
For a given n there are A055684(n) different star-shaped regular polygons. The minimum skip increment for connecting points on the circumference is given by A053669(n), the maximum skip increment is given by a(n). There are no star-shaped polygons for n=3,4,6 and unique star-shaped polygons for n=5,8,10 and 12, for which a(n) = A053669(n).

Crossrefs

Cf. A053669 (least number coprime to n), A055684 (number of different n-pointed stars).

Programs

  • Mathematica
    lnc[n_]:=Module[{k=Floor[n/2]},While[!CoprimeQ[n,k],k--];k]; Array[ lnc,90,7] (* Harvey P. Dale, May 15 2021 *)
  • PARI
    Vec(-x^7*(x^4+x^3-x^2-3)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Feb 21 2015

Formula

a(4*k-1) = a(4*k) = a(4*k+2) = 2*k-1; a(4*k+1) = 2*k.
a(n) = (1/2) (n - (I^n + (-I)^n)/2 - (-1)^n + 4). - Ralf Stephan, May 17 2007
a(n) = a(n-1)+a(n-4)-a(n-5) for n>11. - Colin Barker, Feb 21 2015
G.f.: -x^7*(x^4+x^3-x^2-3) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Feb 21 2015