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.

Previous Showing 41-50 of 61 results. Next

A262669 Consider the Farey sequence of order n, F_n, and that the average distance between any two adjacent pairs in F_n is 1/A002088(n). Then a(n) is the number of adjacent pairs whose difference is less than the average.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 4, 6, 8, 8, 12, 14, 18, 18, 20, 26, 28, 32, 32, 40, 42, 46, 48, 58, 58, 66, 76, 78, 84, 88, 94, 100, 106, 114, 120, 126, 128, 142, 150, 162, 166, 178, 178, 194, 200, 206, 214, 230, 236, 246, 250, 266, 274, 292, 296, 312, 322, 338, 344, 360, 360, 388, 400, 408, 416, 436
Offset: 0

Views

Author

Robert G. Wilson v, Sep 26 2015

Keywords

Comments

Because the Farey fractions are symmetrical about 1/2, a(n) is always even.
Conjecture: this is a monotonic sequence. For n = 0, 1, 3, 4, 8, 12, 17, 23, 41 & 59, a(n) = a(n+1).
If instead the question is when the difference is equal to the average, then the sequence becomes 0, 1, 2, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, ..., . A262670.
Conjecture: Twice the number of pairs less than the average (2*A262669) plus the number of pairs which equal the average (A262670) never exceed the number of pairs which are greater than the average for n greater than 245.
f( 1000) = 100972,
f( 2000) = 403750,
f( 3000) = 908068,
f( 4000) = 1614072,
f( 5000) = 2522376,
f( 6000) = 3631762,
f( 7000) = 4943332,
f( 8000) = 6456904,
f( 9000) = 8171296,
f(10000) = 10088132.

Examples

			a(5) = 2. F_5 = {0, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1} and the first forward difference is {1/5, 1/20, 1/12, 1/15, 1/10, 1/10, 1/15, 1/12, 1/20, 1/5}. The average distance is 1/10 since A002088(5) = 10 which is also the number of adjacent pairs, a/b & c/d.
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, The Queen of Mathematics Entertains, Chapter XVI, "Farey Tails", Dover Books, NY, 1966, pgs 168-172.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{diff = Differences@ Union@ Flatten@ Table[a/b, {b, n}, {a, 0, b}], ave = 1/Sum[ EulerPhi[ m], {m, n}]}, {Length@ Select[diff, ave < # &], Length@ Select[diff, ave == # &], Length@ Select[diff, ave > # &]}]; Array[ f[#][[1]] &, 65, 0]

Formula

a(n) = (n/Pi)^2 + O(n/3*(log(n))^(2/3)*(log(log(n)))^(4/3)), (A. Walfisz 1963).

A359116 Mark the points of the Farey series F_n on a strip of paper and wrap it around a circle of circumference 1 so the endpoints 0 and 1 coincide; draw a chord between every pair of the Farey points; a(n) is the number of vertices in the resulting graph.

Original entry on oeis.org

1, 2, 5, 19, 208, 480, 3011, 7185, 20169, 35438, 111232, 162062, 422841, 633226, 1024370, 1576122, 3315790, 4240974, 8204951, 10654475, 15310713
Offset: 1

Views

Author

Keywords

Comments

Let F_n denote the Farey series of order n: F_1 = [0, 1]; F_2 = [0, 1/2, 1]; F_3 = [0, 1/3, 1/2, 2/3, 1], F_4 = [0, 1/4, 1/3, 1/2, 2/3, 3/4, 1], etc. In general F_n consists of the points i/j with 1 <= j <= n, 0 <= i <= j, gcd(i,j) = 1, sorted and duplicates removed. Alternatively, F_n = [A006842(n,k)/A006843(n,k), k = 1..A005728(n)].
The number of terms in F_n is A005728(n). Since the endpoints coincide when we wrap the series around the circle, there are M = A005728(n) - 1 vertices on the circumference.
The planar graph we are studying, denoted by FR(n), is formed by drawing a chord between every pair of the M boundary points. FR stands for Farey Ring, a term suggested by the fairy rings found in nature.
FR(n) is analogous to the planar graph formed by drawing chords between every pair of vertices of a regular n-gon, and studied in A006533 and A007678. The difference is that in FR(n) the vertices are not equally spaced around the circle.
Just as in the case of the regular n-gon, when we count the regions in this graph, we may or may not include the regions that lie between the convex hull of the points and the bounding circle.
The first non-simple vertices that do not lie on the y = 0 or x = 0 axes occur for n = 7. If we let A = (sin(3*Pi/14) + cos(Pi/7))/(cos(3*Pi/14) + sin(Pi/7)), and B = (cos(2*Pi/7)+1)/sin(2*Pi/7), then the x coordinate of these vertices is x = +-(A*cos(3*Pi/14) - sin(3*Pi/14) - 1)/(B + A), and their y coordinate is y = -B*x - 1. These values are approximately x = +-0.1930964297 and y = -0.5990311320.

Crossrefs

Cf. A359117 (regions), A359118 (edges), A359119 (k-gons).

Formula

a(n) = A359118 - A359117 + 1 by Euler's formula.

A359117 Number of regions in the planar Farey Ring graph FR(n) defined in A359116, including the regions between the convex hull and the bounding circle.

Original entry on oeis.org

1, 2, 8, 30, 250, 548, 3180, 7468, 20684, 36164, 112406, 163600, 425144, 636208, 1028934, 1581766, 3323182, 4249976, 8216442, 10668790, 15329216
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A359116 (vertices), A359118 (edges), A359119 (k-gons), A358886, A006842, A006843, A005728, A007678.

Formula

a(n) = A359118 - A359116 + 1 by Euler's formula.

A359119 Irregular table read by rows: T(n,k) is the number of k-gons, k>=2, in the Farey Ring graph FR(n) defined in A359116.

Original entry on oeis.org

2, 4, 4, 6, 18, 6, 10, 124, 76, 32, 8, 12, 244, 196, 78, 14, 4, 18, 1184, 1296, 534, 118, 28, 2, 22, 2632, 3180, 1244, 330, 58, 2, 28, 7244, 8628, 3594, 962, 190, 38, 32, 12626, 14922, 6378, 1836, 330, 36, 4, 42, 39060, 45656, 20152, 6082, 1252, 132, 28, 2, 46, 56980, 66088, 29454, 8916, 1840, 244, 26, 6
Offset: 2

Views

Author

Keywords

Comments

See A359116 and A359117 for further images of the graphs.

Examples

			The table begins:
2;
4, 4;
6, 18, 6;
10, 124, 76, 32, 8;
12, 244, 196, 78, 14, 4;
18, 1184, 1296, 534, 118, 28, 2;
22, 2632, 3180, 1244, 330, 58, 2;
28, 7244, 8628, 3594, 962, 190, 38;
32, 12626, 14922, 6378, 1836, 330, 36, 4;
42, 39060, 45656, 20152, 6082, 1252, 132, 28, 2;
46, 56980, 66088, 29454, 8916, 1840, 244, 26, 6;
58, 148058, 170352, 76834, 23936, 4990, 766, 136, 12, 0, 2;
64, 221744, 253808, 115806, 35922, 7428, 1286, 136, 14;
72, 359676, 408252, 188438, 57828, 12432, 1972, 246, 16, 2;
80, 553598, 624588, 291158, 89762, 19066, 3104, 374, 30, 6;
96, 1164192, 1305260, 615048, 189910, 41094, 6654, 844, 72, 12;
102, 1491314, 1664362, 788138, 243924, 52438, 8502, 1080, 112, 2, 2;
120, 2887184, 3203244, 1529870, 474822, 102482, 16490, 2002, 206, 22;
128, 3752194, 4153544, 1987610, 617634, 133288, 21374, 2698, 278, 42;
140, 5393824, 5962776, 2855524, 889822, 191612, 31128, 3926, 438, 26;
.
.
		

Crossrefs

Cf. A359116 (vertices), A359117 (regions), A359118 (edges), A358889, A006842, A006843, A005728, A331451.

Formula

Sum of row n = A359117(n).

A359655 Number of edges formed in a square with edge length 1 by straight line segments when connecting the internal edge points that divide the sides into segments with lengths equal to the Farey series of order n to the equivalent points on the opposite side of the square.

Original entry on oeis.org

4, 12, 172, 1320, 14588, 33312, 197416, 469040, 1305112, 2274592, 7172784, 10407700, 27421412
Offset: 1

Views

Author

Keywords

Comments

The number of points internal to each edge is given by A005728(n) - 2.
See A359653 and A359654 for images of the square.

Crossrefs

Cf. A359653 (regions) A359654 (vertices), A359656 (k-gons), A005728, A358888, A358884, A355800, A358950, A006842, A006843.

Formula

a(n) = A359653(n) + A359654(n) - 1 by Euler's formula.

A359691 Number of crossings in a regular drawing of a complete bipartite graph where the vertex positions on each part equal the Farey series of order n.

Original entry on oeis.org

1, 7, 59, 275, 1949, 3971, 20333, 45705, 120899, 205233, 629761, 897707, 2334291, 3461329, 5516985, 8467899
Offset: 1

Views

Author

Keywords

Comments

The number of vertices along each edge is A005728(n). No formula for a(n) is known.
See A359690 for images of the graph.

Crossrefs

Cf. A359690 (vertices), A359692 (regions), A359693 (edges), A359694 (k-gons), A005728, A159065, A331755, A359654, A358887, A358883, A006842, A006843.

Formula

a(n) = A359690(n) - 2*A005728(n).

A262670 Consider the Farey sequence of order n, F_n, and that the average distance between any two adjacent pairs in F_n is 1/A002088(n). Then a(n) is the number of adjacent pairs whose difference is the average.

Original entry on oeis.org

0, 1, 2, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 2, 4, 2, 0, 2, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Robert G. Wilson v, Nov 09 2015

Keywords

Comments

Because the Farey fractions are symmetrical about 1/2 for n > 1, a(n) is always even.
First occurrence of k by index, or -1 if no such occurrence exists: 0, 1, 2, -1, 60, -1, 64, -1, 207, -1, 1047, -1, 1084, -1, ..., .
Where 0 occurs: 0, 3, 7, 8, 10, 12, 13, 14, 17, 20, 22, 23, 26, 28, 30, 32, 33, ..., ;
Where 2 occurs: 2, 4, 5, 6, 9, 11, 15, 16, 18, 19, 21, 24, 25, 27, 29, 31, 36, 37, 38, ..., ;
Where 4 occurs: 60, 68, 120, 129, 148, 158, 159, 168, 180, 216, 225, 231, 239, 241, 249, ..., ;
Where 6 occurs: 65, 227, 401, 403, 492, 600, 616, 780, 861, 862, 865, 967, 1019, 1054, ..., ;
Where 8 occurs: 208, 1210, 1367, 1803, 1804, 1841, 1866, 2397, 2864, 3281, 3443, 3724, ..., ;
Where 10 occurs: 1048, 1094, 1632, 1949, 2269, 2571, 2710, 3365, 3555, 3558, 3613, 3939, ..., ;
Where 12 occurs: 1085, 1358, 2541, 3251, 4411, ..., ;
Where 18 occurs: 4830, ..., ;
For the first 5001 terms: 3315 zeros, 1 one, 1138 twos, 414 fours, 96 sixes, 19 eights, 12 tens, 5 twelves and 1 eighteen.

Examples

			a(5) = 2. F_5 = {0, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1} and the first forward difference is {1/5, 1/20, 1/12, 1/15, 1/10, 1/10, 1/15, 1/12, 1/20, 1/5}. The average distance is 1/10 since A002088(5) = 10 which is also the number of adjacent pairs, a/b & c/d.
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, The Queen of Mathematics Entertains, Chapter XVI, "Farey Tails", Dover Books, NY, 1966, pgs 168-172.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{diff = Differences@ Union@ Flatten@ Table[a/b, {b, n}, {a, 0, b}], ave = 1/Sum[ EulerPhi[ m], {m, n}]}, {Length@ Select[diff, ave < # &], Length@ Select[diff, ave == # &], Length@ Select[diff, ave > # &]}]; Array[f, 65]

A303612 a(n) = min{denominator(r) with r in R} and R = {0 <= r rational <= 1 and [r*k] = n}. Here k = 10^(floor(log_10(n))+1) and [x] = floor(x+1/2) + ceiling((2*x-1)/4) - floor((2*x-1)/4) - 1.

Original entry on oeis.org

1, 7, 4, 3, 5, 2, 5, 3, 4, 7, 10, 9, 8, 15, 7, 13, 19, 6, 11, 16, 5, 14, 9, 13, 17, 4, 19, 11, 18, 7, 10, 13, 19, 3, 29, 17, 11, 19, 8, 18, 5, 17, 12, 7, 9, 11, 13, 15, 21, 35, 2, 35, 21, 15, 13, 11, 9, 7, 12, 17, 5, 18, 8, 19, 11, 17, 29, 3, 19, 13, 10
Offset: 0

Views

Author

Luca Petrone, Apr 27 2018

Keywords

Comments

a(n) is the smallest denominator of a fraction that, when rounded to d digits after the decimal point, is equal to 0.n, where d is the number of digits of n, and the rounding convention applied is that a number whose fractional part is 1/2 is rounded to the nearest even integer.
a(k-n) = a(n), where k is the first power of 10 exceeding n.
The sequence [A297367(n)/a(n), n = 10^(k-1)..10^(k)-1] is a subsequence of the Farey sequence A006842/A006843 of order ceiling((2/3)*10^k). For example, the terms a(1)..a(9) are the denominators of {1/7, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 6/7}; this sequence of fractions is a subsequence of the Farey sequence of order ceiling((2/3)*10^1) = 7, i.e., F7 = {0/1, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 2/5, 3/7, 1/2, 4/7, 3/5, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 1/1}.
With the exception of n in {1, 2, 4, 13, 16}, r(n) = A297367(n)/a(n) is in the Farey series of order n (row n of A006842/A006843). - Peter Luschny, May 19 2018

Examples

			The table below shows the different rational numbers which satisfy the requirements of the definition. The denominators of the first rational number in each row constitute the sequence. Note that the round function is not implemented uniformly in popular software. For example, Mathematica matches our definition, while Maple's round function would return incorrect values.
.
  |                     |  decimal  |     round(10*r)
n | rational numbers r  |   value   | Mathematica | Maple
--+---------------------+-----------+-------------+------
0 | 0/1                 | 0.0000000 |      0      |   0
1 | 1/7, 1/8, 1/9, 1/10 | 0.1428571 |      1      |   1
2 | 1/4, 1/5, 1/6, 2/9  | 0.2500000 |      2      | * 3 *
3 | 1/3, 2/7, 3/10      | 0.3333333 |      3      |   3
4 | 2/5, 3/7, 3/8, 4/9  | 0.4000000 |      4      |   4
5 | 1/2                 | 0.5000000 |      5      |   5
6 | 3/5, 4/7, 5/8, 5/9  | 0.6000000 |      6      |   6
7 | 2/3, 5/7, 7/10      | 0.6666667 |      7      |   7
8 | 3/4, 4/5, 5/6, 7/9  | 0.7500000 |      8      |   8
9 | 6/7, 7/8, 8/9, 9/10 | 0.8571429 |      9      |   9
		

References

  • C. F. Gauss, Theorematis arithmetici demonstratio nova, Societati regiae scientiarum Gottingensis, Vol. XVI., January 15, 1808, pp. 5-7, section 4-5.
  • L. Graham and Donald E. Knuth and Oren Patashnik, Concrete mathematics: a foundation for computer science (Second Edition), Addison-Wesley Publishing Company, 1994, pp. 86-101.
  • Kenneth E. Iverson, A Programming Language, John Wiley And Sons, Inc., 1962 (4th printing 1967), pp. 11-12.
  • Takeo Kamizawa, Note on the Distance to the Nearest Integer, Faculty of Physics, Astronomy and Informatics, Nicolaus Copernicus University, Toruń, Poland, 2016.
  • A. M. Legendre, Théorie des nombres (deuxième édition), 1808.
  • D. Zuras, M. Cowlishaw, R. M. Grow, et al., IEEE Standard for Floating-Point Arithmetic, Std 754(tm)-2008, ISBN 978-0-7381-5753-5, August 28, 2008, p. 16, sections 4.3.1-4.3.3.

Crossrefs

Programs

  • Maple
    r := proc(n) local nint, k, p, q; k := 10^(ilog10(n)+1);
    nint := m -> floor(m + 1/2) + ceil((2*m-1)/4) - floor((2*m-1)/4) - 1;
    for p from 1 to k do for q from p+1 to k do if nint(p*k/q) = n then return p/q fi od od; 0/1 end:
    a := n -> denom(r(n)): seq(a(n), n=0..99); # Peter Luschny, May 19 2018
  • Mathematica
    a = {1};
    For[i = 1, i <= 100, i++,
    nmax = 10^(Floor[Log[10, i]] + 1);
    r = i/nmax;
    For[n = 1, n <= nmax, n++,
    If[Round[Round[n r]/n, 1/nmax] == r,
    a = Flatten[Append[a, n]];
    Break[];
    ]]]

A359118 Number of edges in the planar Farey Ring graph FR(n) defined in A359116, including the regions between the convex hull and the bounding circle.

Original entry on oeis.org

1, 2, 12, 48, 457, 1027, 6190, 14652, 40852, 71601, 223637, 325661, 847984, 1269433, 2053303, 3157887, 6638971, 8490949, 16421392, 21323264, 30639928
Offset: 1

Views

Author

Keywords

Comments

See A359116 and A359117 for images of the figure.

Crossrefs

Cf. A359116 (vertices), A359117 (regions), A359119 (k-gons), A358888, A006842, A006843, A005728, A135565.

Formula

a(n) = A359116 + A359117 - 1 by Euler's formula.

A359656 Irregular table read by rows: T(n,k) is the number of k-gons, k>=3, formed in a square with edge length 1 by straight line segments when connecting the internal edge points that divide the sides into segments with lengths equal to the Farey series of order n to the equivalent points on the opposite side of the square.

Original entry on oeis.org

0, 1, 0, 4, 56, 40, 368, 300, 48, 12, 3376, 3408, 960, 96, 7536, 7524, 2240, 436, 8, 42048, 45112, 13912, 2868, 168, 28, 97720, 105980, 34496, 7020, 832, 52, 8, 267240, 290456, 100560, 20576, 2688, 160, 24, 461800, 509824, 174400, 36228, 4608, 324, 16, 1411272, 1594296, 569152, 126408, 16856, 1408, 104
Offset: 1

Views

Author

Keywords

Comments

The number of points internal to each edge is given by A005728(n) - 2.
See A359653 and A359654 for images of the square.

Examples

			The table begins:
0, 1;
0, 4;
56, 40;
368, 300, 48, 12;
3376, 3408, 960, 96;
7536, 7524, 2240, 436, 8;
42048, 45112, 13912, 2868, 168, 28;
97720, 105980, 34496, 7020, 832, 52, 8;
267240, 290456, 100560, 20576, 2688, 160, 24;
461800, 509824, 174400, 36228, 4608, 324, 16;
1411272, 1594296, 569152, 126408, 16856, 1408, 104;
2054616, 2300184, 830280, 184664, 24480, 2332, 128, 8;
5296752, 6001228, 2253456, 517564, 72888, 7532, 472, 4;
.
.
		

Crossrefs

Cf. A359653 (regions), A359654 (vertices), A359655 (edges), A005728, A358889, A358885, A355801, A358951, A006842, A006843.
Previous Showing 41-50 of 61 results. Next