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 50 results.

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.

A324796 Irregular triangle read by rows: row n gives numerators of fractions in the Farey subsequence B(m).

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 0, 1, 1, 1, 2, 3, 1, 4, 3, 2, 3, 4, 1, 0, 1, 1, 1, 2, 1, 3, 2, 3, 4, 1, 5, 4, 3, 5, 2, 5, 3, 4, 5, 1, 0, 1, 1, 1, 1, 2, 1, 3, 2, 3, 4, 5, 1, 6, 5, 4, 3, 5, 2, 5, 3, 4, 5, 6, 1, 0, 1, 1, 1, 1, 2, 1, 2, 3, 1, 4, 3, 2, 5, 3, 4, 5, 6, 1, 7, 6, 5, 4, 7, 3, 5, 7, 2, 7, 5, 3, 7, 4, 5, 6, 7, 1
Offset: 1

Views

Author

N. J. A. Sloane, Sep 10 2019

Keywords

Comments

B(n) is denoted by F(B(2n),n) in Matveev (2017) - see definition on page 1. B(n) consists of the terms h/k of the Farey series F_{2n} such that k-n <= h <= n.
A049691 gives the row lengths.

Examples

			The first few sequences B(1), B(2), B(3), B(4) are:
[0, 1/2, 1],
[0, 1/3, 1/2, 2/3, 1],
[0, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1],
[0, 1/5, 1/4, 1/3, 2/5, 3/7, 1/2, 4/7, 3/5, 2/3, 3/4, 4/5, 1], [0, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 4/9, 1/2, 5/9, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 1],
...
		

References

  • A. O. Matveev, Farey Sequences, De Gruyter, 2017.

Crossrefs

Cf. A006842/A006843, A049691, A324797 (denominators).

Programs

  • Maple
    Farey := proc(n) sort(convert(`union`({0}, {seq(seq(m/k, m=1..k), k=1..n)}), list)) end:
    B := proc(m) local a,i,h,k; global Farey; a:=[];
    for i in Farey(2*m) do
    h:=numer(i); k:=denom(i);
    if (h <= m) and (k-m <= h) then a:=[op(a),i]; fi; od: a; end;

A324797 Irregular triangle read by rows: row n gives denominators of fractions in the Farey subsequence B(m).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 10 2019

Keywords

Comments

B(n) is denoted by F(B(2n),n) in Matveev (2017) - see definition on page 1. B(n) consists of the terms h/k of the Farey series F_{2n} such that k-n <= h <= n.
A049691 gives the row lengths.

Examples

			The first few sequences B(1), B(2), B(3), B(4) are:
[0, 1/2, 1],
[0, 1/3, 1/2, 2/3, 1],
[0, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1],
[0, 1/5, 1/4, 1/3, 2/5, 3/7, 1/2, 4/7, 3/5, 2/3, 3/4, 4/5, 1], [0, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 4/9, 1/2, 5/9, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 1],
...
		

References

  • A. O. Matveev, Farey Sequences, De Gruyter, 2017.

Crossrefs

Cf. A006842/A006843, A049691, A324796 (numerators).

Programs

  • Maple
    Farey := proc(n) sort(convert(`union`({0}, {seq(seq(m/k, m=1..k), k=1..n)}), list)) end:
    B := proc(m) local a,i,h,k; global Farey; a:=[];
    for i in Farey(2*m) do
    h:=numer(i); k:=denom(i);
    if (h <= m) and (k-m <= h) then a:=[op(a),i]; fi; od: a; end;

A376832 Irregular triangle read by rows: the n-th row gives the number of points of an n X n square lattice that lie above or to the left of a line of increasing slope that passes through two lattice points one of which is the bottom-left corner of the lattice, (0, 0).

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Dec 22 2024

Keywords

Comments

The increasing slopes of the line are given by the Farey series of order n - 1. Specifically, they are given by the fractions A006842(n-1)/A006843(n-1) followed by their reciprocals A006843(n-1)/A006842(n-1) in reverse order, with the fraction 1/1 included only once.

Examples

			The irregular triangle begins as:
   2,  1,  0;
   6,  5,  3,  2,  0;
  12, 11, 10,  9,  6,  5,  4,  3, 0;
  20, 19, 18, 17, 16, 15, 14, 10, 9, 8, 7, 6, 5, 4, 0;
  ...
		

Crossrefs

Cf. A002378, A006842, A006843, A118403 (row lengths), A161680, A379540 (row sums).

Programs

  • Mathematica
    A118403[n_]:=SeriesCoefficient[(1-2*x+2*x^2)*(1+x^2)/(1-x)^3,{x,0,n}]; T[n_,k_]:=If[1<=k<(A118403[n]+1)/2,n(n-1)-k+1,If[(A118403[n]+1)/2<=k<A118403[n],n(n-1)/2-k+(A118403[n]+1)/2,0]]; Table[T[n,k],{n,2,7},{k,A118403[n]}]//Flatten

Formula

T(n, k) = n*(n - 1) - k + 1 for 1 <= k < (A118403(n)+1)/2.
T(n, k) = n*(n - 1)/2 - k + (A118403(n)+1)/2 for (A118403(n)+1)/2 <= k < A118403(n).
T(n, A118403(n)) = 0.

A061560 Lengths of Farey-series (A005728) which are not primes.

Original entry on oeis.org

1, 33, 65, 81, 121, 129, 141, 201, 213, 231, 243, 279, 309, 325, 345, 361, 385, 451, 475, 531, 543, 585, 605, 629, 651, 697, 713, 755, 775, 807, 831, 901, 965, 1001, 1029, 1261, 1309, 1329, 1395, 1495, 1565, 1589, 1661, 1737, 1773, 1833, 1857, 1935, 1967
Offset: 1

Views

Author

Frank Ellermann, May 17 2001

Keywords

Examples

			a(3) = 65 = 5*13 is not a prime, A055197(3-1) = 14, A005728(14) = 65.
		

Crossrefs

Programs

  • Mathematica
    seq = {1}; sum = 1; Do[sum += EulerPhi[k]; If[!PrimeQ[sum], AppendTo[seq, sum]], {k, 1, 80}]; seq (* Amiram Eldar, Mar 01 2020 *)

Formula

a(n) = A005728(A055197(n-1)) for n > 1, a(1) = A005728(0).

Extensions

More terms from Vladeta Jovovic, Jun 03 2001
Offset corrected by Amiram Eldar, Mar 01 2020

A278148 Triangle T(n, m) giving in row n the numerators of the fractions for the Farey dissection of order n.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Nov 22 2016

Keywords

Comments

For the denominators see A278149.
The length of row n is A002088(n) = A005728(n) - 1.
In the Hardy reference one finds from the Farey fractions of order n >= 2 (see A006842/A006843) a dissection of the interval [1/(n+1), n/(n+1)] into A015614(n) = A005728(n) - 2 intervals J(n,j) = [l(n,j), r(n,j)], j = 1..A015614(n). They are obtained from three consecutive Farey fractions of order n: p(n,j-1)/q(n,j-1), p(n,j)/q(n,j), p(n,j+1)/q(n,j+1) by l(n,j) = p(n,j)/q(n,j) - 1/(q(n,j)*(q(n,j) + q(n,j-1))) = (p(n,j) + p(n,j-1))/(q(n,j) + q(n,j-1)) and r(n,j) = p(n,j)/q(n,j) + 1/(q(n,j)*(q(n,j) + q(n,j+1))) = (p(n,j) + p(n,j+1))/(q(n,j) + q(n,j+1)). (Hardy uses N for n, p/q - Chi_{p,q}'' for l (left) and p/q + Chi_{p,q}' for r (right)). For the second equations in l(n,j) and r(n,j) see the identities in Hardy-Wright, p. 23, Theorem 28.
Due to r(n,j) = l(n,j+1), for n >= 2 and j=1..A015614(n), it is sufficient to give for this Farey dissection of order n >= 2 only the two endpoints of the interval [1/(n+1), n/(n+1)] and the A015614(n) - 1 = A002088 - 2 = A005728(n) - 3 inner boundary points. The present table gives the numerators of these fractions. See the example section. For n = 1 we add the row 1/2 in accordance with A002088(1) = 1.

Examples

			The triangle T(n, m) begins:
n\m 1 2 3 4 5 6 7 8 9 10 11 12 ...
1:  1
2:  1 2
3:  1 2 3 3
4:  1 2 2 3 5 4
5:  1 2 2 3 3 4 5 5 7  5
6:  1 2 2 2 3 3 4 5 5  7  9  6
...
n = 7:  1 2 2 2 3 3 3 5 4 5 7 5 7 8 7 9 11 7,
n = 8:  1 2 2 2 2 3 3 4 5 5 4 5 7 8 7 7 8 7 9 11 13 8,
n = 9:  1 2 2 2 2 3 3 3 3 4 5 5 7 5 6 9 7 8 7 7 8 10 11 9 11 13 15 9,
n = 10: 1 2 2 2 2 2 3 3 3 5 4 4 5 5 7 5 6 9 7 8 7 9 12 8 10 11 9 11 13 15 17 10.
.............................................
The fractions T(n,m)/A278149(n, m) begin:
n\m 1    2   3   4   5   6   7   8   9  10
1: 1/2
2: 1/3  2/3
3: 1/4  2/5 3/5 3/4
4: 1/5  2/7 2/5 3/5 5/7 4/5
5: 1/6  2/9 2/7 3/8 3/7 4/7 5/8 5/7 7/9 5/6
...
n = 6: 1/7 2/11 2/9 2/7 3/8 3/7 4/7 5/8 5/7 7/9 9/11 6/7,
n = 7: 1/8 2/13 2/11 2/9 3/11 3/10 3/8 5/12 4/9 5/9 7/12 5/8 7/10 8/11 7/9 9/11 11/13 7/8,
n = 8: 1/9 2/15 2/13 2/11 2/9 3/11 3/10 4/11 5/13 5/12 4/9 5/9 7/12 8/13 7/11 7/10 8/11 7/9 9/11 11/13 13/15 8/9,
n = 9: 1/10 2/17 2/15 2/13 2/11 3/14 3/13 3/11 3/10 4/11 5/13 5/12 7/16 5/11 6/11 9/16 7/12 8/13 7/11 7/10 8/11 10/13 11/14 9/11 11/13 13/15 15/17 9/10,
n = 10: 1/11 2/19 2/17 2/15 2/13 2/11 3/14 3/13 3/11 5/17 4/13 4/11 5/13 5/12 7/16 5/11 6/11 9/16 7/12 8/13 7/11 9/13 12/17 8/11 10/13 11/14 9/11 11/13 13/15 15/17 17/19 10/11.
.............................................
For n = 5 the actual intervals J(5,j), j= 1..9 are then:
[1/6, 2/9], [2/9, 2/7], [2/7, 3/8], [3/8, 3/7], [3/7, 4/7], [4/7, 5/8], [5/8, 5/7], [5/7, 7/9], [7/9, 5/6].
		

References

  • G. H. Hardy, Ramanujan, AMS Chelsea Publ., Providence, RI, 2002, p. 121.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 5th ed., Clarendon Press, Oxford, 2003, pp. 23, 29 - 31.

Crossrefs

Formula

T(1, 1) = 1 and for n>= 2: T(n, 1) = 1, T(n, A002088(n)) = n and for m = 2..(A002088(n) - 1): T(n, m) = numerator(l(n,m)) = numerator( p(n,m)/q(n,m) - 1/(q(n,m)*(q(n,m) + q(n,m-1)))).

A122632 Table T(n,k) = number of initial segments of Beatty sequences for numbers > 1 of length k, cutting sequence so that all terms are < n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 3, 2, 3, 1, 1, 3, 2, 2, 3, 1, 1, 4, 3, 2, 3, 4, 1, 1, 4, 3, 3, 3, 3, 4, 1, 1, 5, 3, 4, 2, 4, 3, 5, 1, 1, 5, 4, 3, 3, 3, 3, 4, 5, 1, 1, 6, 4, 4, 5, 2, 5, 4, 4, 6, 1, 1, 6, 4, 4, 4, 4, 4, 4, 4, 4, 6, 1, 1, 7, 5, 5, 4, 6, 2, 6, 4, 5, 5, 7, 1, 1, 7, 5, 5, 4, 6, 4, 4, 6, 4, 5, 5, 7, 1
Offset: 1

Views

Author

Keywords

Comments

Enumerate all rational numbers q in [0,1) with denominator <= n. T(n,k) is the number of these with floor(n*q) = k-1. Problem suggested by David W. Wilson.

Examples

			T(6,3) = 2; the sequences for n=6, k=3 are 0,2,4 and 0,2,5. The sequence 0,1,3 is not counted because the next term of a Beatty sequence beginning 0,1,3 must be 4 or 5, so 0,1,3 is not a Beatty sequence truncated to numbers less than 6.
		

Crossrefs

Cf. A002088 (row sums), A006842/A006843 (Farey fractions).

Programs

A244396 a(n) = Sum_{k=1, n} phi(k)*index(k, n), with phi(k) the Euler totient A000010(k) and index(k,n) the position of 1/k in the n-th row of the Farey sequence of order k, A049805(n,k).

Original entry on oeis.org

2, 5, 12, 21, 39, 54, 87, 117, 162, 204, 279, 333, 435, 516, 624, 732, 900, 1017, 1224, 1380, 1590, 1785, 2082, 2286, 2616, 2886, 3237, 3543, 4005, 4305, 4830, 5238, 5748, 6204, 6816, 7266, 8004, 8571, 9279, 9879, 10779, 11373, 12360, 13110, 14010, 14835
Offset: 1

Views

Author

Michel Marcus, Jun 27 2014

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := With[{f = FareySequence[n]}, Sum[EulerPhi[k] FirstPosition[f, 1/k ][[1]], {k, 1, n}]]; Array[a, 50] (* Jean-François Alcover, Sep 26 2018 *)
  • PARI
    farey(n) = {vf = [0]; for (k=1, n, for (m=1, k, vf = concat(vf, m/k););); vecsort(Set(vf));}
    a(n) = my(row = farey(n)); sum(k=1, n, eulerphi(k)*vecsearch(row, 1/k));

Formula

a(n) = Sum_{k=1, n} A000010(k)*A049805(k, n).
a(n) = n^3/(6*zeta(3)) + O(n^2). (see (22) in Tomás link).

A255541 a(n) = 1+Sum_{k=1..2^n-1} A000010(k).

Original entry on oeis.org

1, 2, 5, 19, 73, 309, 1229, 4959, 19821, 79597, 318453, 1274563, 5097973, 20397515, 81591147, 326371001, 1305482159, 5222040189, 20888133573, 83552798667, 334211074959, 1336845501841, 5347382348679, 21389531880435, 85558125961121, 342232529890275, 1368930120480617, 5475720508827645, 21902882035220391, 87611528574186091, 350446114129452131, 1401784457568941917, 5607137830212707769
Offset: 0

Views

Author

Robert G. Wilson v, Feb 24 2015

Keywords

Comments

Number of fractions in Farey series of order 2^n-1.

Examples

			For each n, measure the size of the set of reduced fractions with a denominator less than 2^n:
a(0) = 1 since the set of reduced fractions with denominator less than 2^0 = 1 is {0}.
a(1) = 2 since the set of reduced fractions with denominator less than 2^1 = 2 is {0, 1}.
a(2) = 5 since the set of reduced fractions with denominator less than 2^2 = 4 is {0, 1/3, 1/2, 2/3, 1}.
a(3) = 19 since the set of reduced fractions with denominator less than 2^3 = 8 is {0, 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}.
		

Crossrefs

Cf. A007305, A007306, A000010, A049643, A006842/A006843 (Farey fractions).

Programs

  • Mathematica
    k = s = 1; lst = {}; Do[While[k < 2^n, s = s + EulerPhi@ k; k++]; AppendTo[lst, s], {n, 0, 26}]; lst
    a[n_] := 1 + (1/2) Sum[ MoebiusMu[k]*Floor[n/k]*Floor[1 + n/k], {k, n}]; Array[a, 27, 0]

Formula

a(n) ~ (2^n-1)^2 / Pi.
a(n) = 2+A015614(2^n-1).
a(n) = A005728 (2^n-1). - Michel Marcus, Feb 27 2015
a(n) = (3+A018805(2^n-1))/2. - Colin Linzer, Aug 06 2025

A355616 a(n) is the number of distinct lengths between consecutive points of the Farey sequence of order n.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 14, 15, 21, 23, 29, 31, 34, 38, 48, 49, 59, 63, 67, 71, 83, 86, 97, 100, 110, 115, 132, 133, 150, 158, 165, 169, 182, 187, 208, 213, 222, 228, 252, 254, 280, 287, 297, 304, 331, 337, 362, 367, 379, 387, 418, 423, 437, 450, 464, 472, 509, 513, 548, 556, 573, 589, 608, 611, 652, 665, 681, 685
Offset: 1

Views

Author

Travis Hoppe, Jul 09 2022

Keywords

Comments

The Farey sequence of order n (row n of A006842/A006843) is the set of points x/y on the unit line where 1 <= y <= n and 0 <= x <= y.

Examples

			For n=5, the Farey sequence (completely reduced fractions) is [0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1]. The distinct lengths between consecutive points are {1/5, 1/20, 1/12, 1/15, 1/10} so a(5) = 5.
		

Crossrefs

Cf. A006842/A006843 (Farey sequences).
Cf. A005728 (number of distinct points).

Programs

  • Mathematica
    a[n_] := FareySequence[n] // Differences // Union // Length;
    Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Jul 16 2022 *)
  • PARI
    vp(n) = my(list = List()); for (k=1, n, for (i=0, k, listput(list, i/k))); vecsort(list,,8);
    a(n) = my(v=vp(n)); #Set(vector(#v-1, k, abs(v[k+1]-v[k]))); \\ Michel Marcus, Jul 10 2022
  • Python
    from fractions import Fraction
    from itertools import chain
    def compute(n):
        marks = [[(a, b) for a in range(0, b + 1)] for b in range(1, n + 1)]
        marks = sorted(set([Fraction(a, b) for a, b in chain(*marks)]))
        dist = [(y - x) for x, y in zip(marks, marks[1:])]
        return len(set(dist))
    
Previous Showing 41-50 of 50 results.