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 51-60 of 61 results. Next

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).

A246064 A variation of the Farey sequence read by rows; the row of order n is defined by the greatest whole numbers less than or equal to the values generated when the numerators of the Farey sequence (order n) are replaced by n itself.

Original entry on oeis.org

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

Views

Author

Neill L. Robson, Aug 24 2014

Keywords

Comments

Consider the area on the coordinate plane swept by a polar angle ranging from 0 to Pi/4 radians. Take every integer coordinate pair from that area whose coordinate components do not exceed the magnitude of n (i.e., if n=9, coordinate (9, 3) is chosen but not (10, 3) ). There would be a distinct number of angles between 0 and Pi/4 radians representing each point's polar angle. For large enough n, some points would share the same angle; for instance, where n=9, Cartesian points (3, 1), (6, 2), and (9, 3) would be chosen, yet all would have the radian angle arctan(1/3).
Consider these unique angle values in ascending order. Replace each angle with the number of points that could be represented in polar form with that angle (i.e., arctan(1/3) from the above example would be replaced with 3). This will result in row n of the sequence.
Row n has A005728(n) terms.

Examples

			As an example, the 4th row of the sequence (n=4) is 4, 1, 1, 2, 1, 1, 4.
Triangle starts:
  1, 1;
  2, 1, 2;
  3, 1, 1, 1, 3;
  4, 1, 1, 2, 1, 1, 4;
  5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 5;
  ...
		

Crossrefs

Programs

  • J
    <. (% A006843)~ n
    NB. A006843 is assumed to return a list of Farey denominators of order n, as described in the OEIS.
    
  • PARI
    row(n) = {vf = [0]; for (k=1, n, for (m=1, k, vf = concat(vf, m/k); ); ); vf = vecsort(Set(vf)); for (i=1, #vf, print1(n\denominator(vf[i]), ", ")); } \\ Michel Marcus, Sep 04 2014

Formula

Row n of the sequence (sequence of order n) is given by floor(n/A006843(n)).

A248832 The sum of denominators of unreduced mediants in Farey sequences of orders 1,2,..,n.

Original entry on oeis.org

2, 6, 16, 34, 72, 122, 214, 338, 516, 734, 1062, 1438, 1970, 2586, 3322, 4186, 5322, 6566, 8152, 9898, 11896, 14114, 16838, 20254, 23982, 28196, 32746, 38108, 43710, 50242, 57286, 64990, 73238, 82326, 91846, 102698, 114234, 126706, 139818
Offset: 0

Views

Author

Nehul Yadav, Oct 15 2014

Keywords

Examples

			For n=4, the unreduced mediants are 1/2, 2/4, 5/10, 9/18, hence the sum of denominators is 2+4+10+18 = 34.
		

Crossrefs

Formula

a(n) = 2*Sum_{k= 1,2,3,4..n} A213544(k).

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
Previous Showing 51-60 of 61 results. Next