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-5 of 5 results.

A113136 The rational numbers can be ordered by height and then by magnitude (see A002246, A097080); sequence gives numerators.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 02 2008

Keywords

Examples

			The rationals with this ordering, with those of height k in row k (there are three of height 1, and 4*A000010(k) rationals of height k, for k>1):
-1 0 1
-2 -1/2 1/2 2
-3 -3/2 -2/3 -1/3 1/3 2/3 3/2 3
-4 -4/3 -3/4 -1/4 1/4 3/4 4/3 4
...
		

References

  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 7.

Crossrefs

Extensions

More terms from John W. Layman, Nov 06 2008

A113137 The rational numbers can be ordered by height and then by magnitude (see A002246, A097080); sequence gives denominators.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 02 2008

Keywords

Examples

			The rationals with this ordering, with those of height k in row k (there are 4*A000010(k) rationals of height k, for k>1):
-1 0 1
-2 -1/2 1/2 2
-3 -3/2 -2/3 -1/3 1/3 2/3 3/2 3
-4 -4/3 -3/4 -1/4 1/4 3/4 4/3 4
...
		

References

  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 7.

Crossrefs

Extensions

More terms from John W. Layman, Nov 06 2008

A097080 a(n) = 2*n^2 - 2*n + 3.

Original entry on oeis.org

3, 7, 15, 27, 43, 63, 87, 115, 147, 183, 223, 267, 315, 367, 423, 483, 547, 615, 687, 763, 843, 927, 1015, 1107, 1203, 1303, 1407, 1515, 1627, 1743, 1863, 1987, 2115, 2247, 2383, 2523, 2667, 2815, 2967, 3123, 3283, 3447, 3615, 3787, 3963, 4143, 4327, 4515, 4707
Offset: 1

Views

Author

N. J. A. Sloane, Nov 02 2008

Keywords

Comments

The rational numbers may be totally ordered, first by height (see A002246) and then by magnitude; every rational number of height n appears in this ordering at a position <= a(n).
This ordering of the rationals is given in A113136/A113137.
The old entry with this sequence number was a duplicate of A027356.
This is also the sum of the pairwise averages of five consecutive triangular numbers in A000217. Start with A000217(0): (0+1)/2 + (1+3)/2 + (3+6)/2 + (6+10)/2 = 15, which is the third term of this sequence. Simply continue to create this sequence. - J. M. Bergot, Jun 13 2012
2*a(n) is inverse radius (curvature) of the touching circle of the large semicircle (radius 1) and the n-th and (n-1)-st circles of the Pappus chain of the symmetric Arbelos. One can use Descartes three circle theorem to find the solution 4*n^2 - 4*n + 6, n >= 1. Note that the circle with curvature 6 is also the third circle of the clockwise Pappus chain, which is A059100(2) (by symmetry). See the illustration. - Wolfdieter Lang and Kival Ngaokrajang, Jul 01 2015
Numbers k such that 2*k - 5 is a square. - Bruno Berselli, Nov 08 2017

References

  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996, p. 7.

Crossrefs

Programs

  • Haskell
    a097080 n = 2 * n * (n - 1) + 3  -- Reinhard Zumkeller, Dec 15 2013
  • Mathematica
    Table[2n^2-2n+3,{n,50}] (* or *) LinearRecurrence[{3,-3,1},{3,7,15},50] (* Harvey P. Dale, Aug 02 2014 *)
    CoefficientList[Series[(3 - 2 x + 3 x^2)/(1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Aug 03 2014 *)
  • PARI
    a(n)=2*n^2-2*n+3 \\ Charles R Greathouse IV, Jun 13 2012
    
  • PARI
    Vec(x*(3-2*x+3*x^2)/(1-x)^3 + O(x^50)) \\ Altug Alkan, Nov 11 2015
    

Formula

a(n) = 4*(n-1) + a(n-1) for n > 1, a(1)=3. - Vincenzo Librandi, Nov 16 2010
a(n) = A046092(n) + 3. - Reinhard Zumkeller, Dec 15 2013
G.f.: x*(3 - 2*x + 3*x^2)/(1 - x)^3. - Vincenzo Librandi, Aug 03 2014
a(n) = A027575(n-2)/2. - Michel Marcus, Nov 11 2015
Sum_{n>=1} 1/a(n) = Pi*tanh(sqrt(5)*Pi/2)/(2*sqrt(5)). - Amiram Eldar, Dec 23 2022
From Elmo R. Oliveira, Nov 16 2024: (Start)
E.g.f.: exp(x)*(2*x^2 + 3) - 3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

A171503 Number of 2 X 2 integer matrices with entries from {0,1,...,n} having determinant 1.

Original entry on oeis.org

0, 3, 7, 15, 23, 39, 47, 71, 87, 111, 127, 167, 183, 231, 255, 287, 319, 383, 407, 479, 511, 559, 599, 687, 719, 799, 847, 919, 967, 1079, 1111, 1231, 1295, 1375, 1439, 1535, 1583, 1727, 1799, 1895, 1959, 2119, 2167, 2335, 2415, 2511, 2599
Offset: 0

Views

Author

Jacob A. Siehler, Dec 10 2009

Keywords

Comments

Number of distinct solutions to k*x+h=0, where |h|<=n and k=1,2,...,n. - Giovanni Resta, Jan 08 2013.
Number of reduced rational numbers r/s with |r|<=n and 0Juan M. Marquez, Apr 13 2015

Crossrefs

Cf. A062801, A000010, A018805. Differences are A002246.
See A326354 for an essentially identical sequence.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember;
           `if`(n<2, [0, 3][n+1], a(n-1) + 4*phi(n))
        end:
    seq(a(n), n=0..60);
  • Mathematica
    a[n_]:=Count[Det/@(Partition[ #,2]&/@Tuples[Range[0,n],4]),1]
    (* Second program: *)
    a[0] = 0; a[1] = 3; a[n_] := a[n] = a[n-1] + 4*EulerPhi[n];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 16 2018 *)
  • PARI
    a(n)=(n>0)+2*sum(k=1, n, moebius(k)*(n\k)^2) \\ Charles R Greathouse IV, Apr 20 2015
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A171503(n): # based on second formula in A018805
        if n == 0:
            return 0
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*(A171503(k1)-1)//2
            j, k1 = j2, n//j2
        return 2*(n*(n-1)-c+j) - 1 # Chai Wah Wu, Mar 25 2021

Formula

Recursion: a(n) = a(n - 1) + 4*phi(n) for n > 1, with phi being Euler's totient function. - Juan M. Marquez, Jan 19 2010
a(n) = 4 * A002088(n) - 1 for n >= 1. - Robert Israel, Jun 01 2014

Extensions

Edited by Alois P. Heinz, Jan 19 2011

A217029 Array T(i,j) read by antidiagonals, where T(i,j) is the height of i/j, that is max(|m|,|n|) with m/n = i/j and gcd(m, n) = 1.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Sep 24 2012

Keywords

Examples

			1, 2, 3, 4, 5, 6, ...
2, 1, 3, 2, 5, 3, ...
3, 3, 1, 4, 5, 2, ...
...
		

Crossrefs

Cf. A002246.

Programs

  • Mathematica
    t[i_, j_] := Max[ Abs[ Numerator[r = i/j]], Denominator[r]]; Table[ t[i-j+1, j], {i, 1, 14}, {j, 1, i}] // Flatten
  • PARI
    T(i,j)=max(i/gcd(i,j),j/gcd(i,j)) \\ Charles R Greathouse IV, Sep 25 2012
Showing 1-5 of 5 results.