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.

Showing 1-2 of 2 results.

A206350 Position of 1/n in the canonical bijection from the positive integers to the positive rational numbers.

Original entry on oeis.org

1, 2, 4, 8, 12, 20, 24, 36, 44, 56, 64, 84, 92, 116, 128, 144, 160, 192, 204, 240, 256, 280, 300, 344, 360, 400, 424, 460, 484, 540, 556, 616, 648, 688, 720, 768, 792, 864, 900, 948, 980, 1060, 1084, 1168, 1208, 1256, 1300, 1392, 1424, 1508, 1548
Offset: 1

Views

Author

Clark Kimberling, Feb 06 2012

Keywords

Comments

The canonical bijection from the positive integers to the positive rational numbers is given by A038568(n)/A038569(n).
Appears to be a variant of A049696. - R. J. Mathar, Feb 11 2012
Apparently numbers m such that A071912(m) = 1. - Bill McEachen, Aug 01 2023

Examples

			The canonical bijection starts with 1/1, 1/2, 2/1, 1/3, 3/1, 2/3, 3/2, 1/4, 4/1, 3/4, 4/3, 1/5, 5/1, so that A206297 starts with 1,3,5,9,13 and this sequence starts with 1,2,4,8,12.
		

Crossrefs

Programs

  • Magma
    [1] cat [2*(&+[EulerPhi(k): k in [1..n-1]]): n in [2..80]]; // G. C. Greubel, Mar 29 2023
    
  • Maple
    1, op(2*ListTools:-PartialSums(map(numtheory:-phi, [$1..100]))); # Robert Israel, Apr 24 2015
  • Mathematica
    a[n_]:= Module[{s=1, k=2, j=1},
      While[s<=n, s= s + 2*EulerPhi[k]; k= k+1];
      s = s - 2*EulerPhi[k-1];
      While[s<=n, If[GCD[j, k-1] == 1,
        s = s+2]; j = j+1];
      If[s>n+1, j-1, k-1]];
    t = Table[a[n], {n, 0, 3000}];   (* A038568 *)
    ReplacePart[Flatten[Position[t, 1]], 1, 1] (* A206350 *)
    (* Second program *)
    a[n_]:= If[n==1, 1, 2*Sum[EulerPhi[k], {k, n-1}]];;
    Table[a[n], {n, 80}] (* G. C. Greubel, Mar 29 2023 *)
  • SageMath
    def A206350(n): return 1 if (n==1) else 2*sum(euler_phi(k) for k in range(1,n))
    [A206350(n) for n in range(1,80)] # G. C. Greubel, Mar 29 2023

Formula

a(1) = 1, a(n+1) = Sum_{k=1..n} mu(k) * floor(n/k) * floor(1 + n/k), where mu(k) is the Moebius function A008683. - Daniel Suteu, May 28 2018
a(n) = 2*Sum_{k=1..n-1} A000010(k), a(1) = 1. - Robert Israel, Apr 24 2015

A305397 Let k be the maximal number of vertices in an n X n lattice grid that form a convex polygon, then a(n) = floor(k/2).

Original entry on oeis.org

2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 8, 9, 10, 10, 10, 11, 12
Offset: 1

Views

Author

N. J. A. Sloane, Jun 27 2018

Keywords

Examples

			In a 3x3 square cells grid (which is rather 4x4 in the terms of vertices), one can choose eight vertices forming a convex octagon (namely, all non-corner boundary vertices) but no nine vertices to form a convex nonagon, therefore a(3) = floor(8/2) = 4, the "edge-diameter" of the octagon.
		

Crossrefs

Formula

a(A011755(n)) = A049696(n). [Deza et al., Proposition 3.1] - Andrey Zabolotskiy, Sep 27 2024

Extensions

Name clarified by Andrey Zabolotskiy, Sep 27 2024
Showing 1-2 of 2 results.