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

A070304 a(n) = number of times n^2*k^2/(n^2+k^2) is an integer as k ranges over 0, 1, 2, ...

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, May 10 2002

Keywords

Comments

A018892(n) gives the number of integers of the form nk/(n+k).

Crossrefs

Cf. A066451.

Programs

  • PARI
    for(n=1,150,print1(sum(i=0,n^2,if((n^2*i^2)%(n^2+i^2),0,1)),","))

A182082 Number of pairs, (x,y), with x >= y, whose LCM does not exceed n.

Original entry on oeis.org

1, 3, 5, 8, 10, 15, 17, 21, 24, 29, 31, 39, 41, 46, 51, 56, 58, 66, 68, 76, 81, 86, 88, 99, 102, 107, 111, 119, 121, 135, 137, 143, 148, 153, 158, 171, 173, 178, 183, 194, 196, 210, 212, 220, 228, 233, 235, 249, 252, 260, 265, 273, 275, 286, 291, 302, 307, 312
Offset: 1

Views

Author

Walt Rorie-Baety, Apr 10 2012

Keywords

Comments

Note that this is the asymmetric count. If all pairs (x,y) are counted, A061503 is obtained. - T. D. Noe, Apr 10 2012

Examples

			a(1000000) = 37429395, according to Project Euler problem #379.
		

Crossrefs

Partial sums of A018892.
Cf. A000005, A007875, A013661, A061503 (symmetric case).

Programs

  • Haskell
    a n = length [(x,y)| x <- [1..n], y <- [x..n], lcm x y <= n]
    
  • Mathematica
    Table[Count[Flatten[Table[LCM[i, j], {i, n}, {j, i, n}]], ?(# <= n &)], {n, 60}] (* _T. D. Noe, Apr 10 2012 *)
    nn = 100; (Accumulate[Table[DivisorSigma[0, n^2], {n, nn}]] + Range[nn])/2 (* T. D. Noe, Apr 10 2012 *)
  • PARI
    a(n)=(sum(k=1,n,numdiv(k^2))+n)/2 \\ Charles R Greathouse IV, Apr 10 2012

Formula

a(n) = Sum_{k=1..n} (d(k^2)+1)/2, where d is the number of divisors function (A000005). - Charles R Greathouse IV, Apr 10 2012
a(n) = Sum_{k=1..n} A007875(k) * floor(n/k). - Daniel Suteu, Jan 08 2021
a(n) ~ n * log(n)^2 /(4*zeta(2)) (see A018892 for a more accurate asymptotic formula). - Amiram Eldar, Feb 01 2025

A309149 Number of solutions of the Diophantine equation 1/n + 1/x = 1/y + 1/z, where n >= 1, x >= n, y > n and z >= y.

Original entry on oeis.org

0, 3, 9, 14, 22, 33, 29, 44, 56, 65, 50, 108, 53, 101, 141, 97, 64, 150, 73, 216, 184, 119, 81, 274, 138, 141, 182, 263, 101, 378, 90, 222, 270, 183, 375, 419, 102, 185, 319, 479, 121, 486, 115, 394, 520, 187, 118, 565, 227, 362
Offset: 1

Views

Author

S. Nazardonyavi, Jul 14 2019

Keywords

Examples

			n=2: 1/2 + 1/6 = 1/3 + 1/3, 1/2 + 1/12 = 1/3 + 1/4, 1/2 + 1/30 = 1/3 + 1/5.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length@Solve[1/(n)+1/(x)==1/y+1/z&&x>=n&&z>=y&&y>n,{x,y,z},Integers];
    Array[a,50]

A309150 Number of solutions of the Diophantine equation 1/n + 1/x = 1/y + 1/z, where n >= 1, x > n, y > n and z > y.

Original entry on oeis.org

0, 2, 7, 12, 20, 29, 27, 41, 52, 60, 48, 101, 51, 96, 134, 93, 62, 142, 71, 209, 176, 114, 79, 264, 134, 136, 176, 256, 99, 363, 88, 217, 262, 178, 368, 406, 100, 180, 311, 469, 119, 471, 113, 386, 508, 182, 116, 552, 223, 353
Offset: 1

Views

Author

S. Nazardonyavi, Jul 14 2019

Keywords

Examples

			n=2:  1/2 + 1/12 = 1/3 + 1/4, 1/2 + 1/30 = 1/3 + 1/5.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length@Solve[1/(n)+1/(x)==1/y+1/z&&x>n&&z>y&&y>n,{x,y,z},Integers];
    Array[a,50]

A337298 Sum of the coordinates of all relatively prime pairs of divisors of n, (d1,d2), such that d1 <= d2.

Original entry on oeis.org

2, 5, 6, 10, 8, 21, 10, 19, 16, 29, 14, 46, 16, 37, 36, 36, 20, 61, 22, 64, 46, 53, 26, 91, 34, 61, 44, 82, 32, 141, 34, 69, 66, 77, 64, 136, 40, 85, 76, 127, 44, 181, 46, 118, 106, 101, 50, 176, 60, 133, 96, 136, 56, 173, 92, 163, 106, 125, 62, 316, 64, 133, 136, 134, 106, 261, 70
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 21 2020

Keywords

Examples

			a(4) = 10; There are 3 divisors of 4: {1,2,4}. If we list the relatively prime pairs (d1,d2), where d1 <= d2, we get (1,1), (1,2), (1,4). The sum of the coordinates from all pairs is 1+1+1+2+1+4 = 10.
a(5) = 8; There are 2 divisors of 5: {1,5}. The relatively prime pairs (d1,d2), where d1 <= d2 are: (1,1) and (1,5). The sum of the coordinates is then 1+1+1+5 = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(i + k) KroneckerDelta[GCD[i, k], 1] (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 100}]
  • PARI
    a(n) = my(d = divisors(n)); sum(i=1, #d, sum(j=1, i, if (gcd(d[i],d[j])==1, d[i]+d[j])));  \\ Michel Marcus, Aug 22 2020

Formula

a(n) = Sum_{i|n, k|n, i<=k, gcd(i,k)=1} (i+k).

A352881 a(n) is the minimal number z having the largest number of solutions to the Diophantine equation 1/z = 1/x + 1/y such that 1 <= x <= y <= 10^n.

Original entry on oeis.org

2, 12, 60, 840, 9240, 55440, 720720, 6126120, 116396280, 232792560, 5354228880, 26771144400, 465817912560, 4813451763120, 24067258815600, 144403552893600, 2671465728531600, 36510031623265200, 219060189739591200, 4709794079401210800, 18839176317604843200, 221360321731856907600
Offset: 1

Views

Author

Darío Clavijo, Apr 06 2022

Keywords

Comments

Solving for z gives z = (x*y) / (x+y), so x*y == 0 (mod x+y).
All known terms are from A025487:
a(1) = 2 = 2;
a(2) = 12 = 2^2 * 3;
a(3) = 60 = 2^2 * 3 * 5;
a(4) = 840 = 2^3 * 3 * 5 * 7;
a(5) = 9240 = 2^3 * 3 * 5 * 7 * 11.
If a solution to the equation 1/z = 1/x + 1/y is found such that gcd(x,y,z) is a square, then x+y, x*y*z, and (x-y)^2 + (2*z)^2 are also squares.
For all solutions, x^2 + y^2 + z^2 is a square.
The sequence is indeed a subsequence of A025487, and likely of A126098 as well. - Max Alekseyev, Mar 01 2023
a(n) < 5*10^(n-1). - Max Alekseyev, Mar 01 2023

Examples

			For n=1, we have the following, where r = (x*y) mod (x+y). (In the last four columns, each number marked by an asterisk is a square.)
.
  r  z  x  y  x*y  x+y  x*y*z  x^2+y^2+z^2
  -  -  -  -  ---  ---  -----  -----------
  0  1  2  2    4*   4*     4*           9* (solution)
  2  1  2  4    8    6      8           21
  4  1  2  6   12    8     12           41
  6  1  2  8   16*  10     16*          69
  3  1  3  3    9    6      9*          19
  0  2  3  6   18*   9*    36*          49* (solution)
  3  2  3  9   27   12     54           94
  0  2  4  4   16*   8     32           36* (solution)
  8  2  4  8   32   12     64*          84
  5  2  5  5   25*  10     50           54
  0  3  6  6   36*  12    108           81* (solution)
  7  3  7  7   49*  14    147          107
  0  4  8  8   64*  16*   256*         144* (solution)
  9  4  9  9   81*  18    324*         178
.
z = 2 has the largest number of solutions, so a(1) = 2.
The number of solutions for the resulting z cannot exceed A018892(z).
		

Crossrefs

Programs

  • PARI
    a(n)=my(bc=0,bk=0,L=10^n);for(k=1,L-1,my(c=0,k2=k^2);for(d=max(1,k2\(L-k)+1),k,if(k2%d==0,c++););if(c>bc,bc=c;bk=k););return(bk); \\ Darío Clavijo, Mar 03 2025
  • Python
    def a(n):
        # k=x*y and d=x+y
        bc, bk, L = 0, None, 10**n
        for k in range(1, L):
            c, k2 = 0, k * k
            for d in range(max(1, k2 // (L - k) + 1), k + 1):
                if k2 % d == 0: c += 1
            if c > bc:
                bc, bk = c, k
        return bk
    

Extensions

a(6) from Chai Wah Wu, Apr 10 2022
a(7)-a(22) from Max Alekseyev, Mar 01 2023

A284167 a(n) = Sum_{i=1..A000005(n)} d(n+k(i)), where d(t) is the number of divisors of t and k(i) is the i-th divisor of n.

Original entry on oeis.org

2, 5, 7, 10, 8, 15, 8, 18, 16, 18, 10, 29, 8, 19, 25, 28, 10, 33, 10, 35, 26, 20, 12, 50, 18, 20, 31, 36, 12, 51, 10, 42, 27, 23, 33, 62, 8, 22, 30, 60, 12, 53, 10, 40, 52, 22, 14, 78, 20, 41, 28, 38, 12, 63, 36, 63, 30, 24, 16, 95, 8, 23, 59, 60, 32, 54, 10
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 21 2017

Keywords

Comments

Let S(n,n) be the number of solutions of the equation n/x + n/y = c where n, c, x, and y are positive integers. Then S(n,n) = Sum_{i=1..A000005(n)} d(n+k(i)), where d(t) is the number of divisors of t and k(i) is the i-th divisor of n.
For c = 1 , S(n,n) = A000005(n).
Let S(n,m) be the number of solutions of the equation n/x + m/y = c where n, m, c, x, and y are positive integers, n not equal to m. Let k(i) be the i-th divisor of n, and k(j) the j-th divisor of m. Let d(t) be the number of divisors of t. Let R = d(k(i) + k(j)). Then S(n,m) = Sum_{i=1..A000005(n)} Sum_{j=1..A000005(m)} [R*1 if gcd(k(i),k(j)) = 1 , R*0 else].
For c = 1 , S(n,m) = A000005(n) * A000005(m) - P, where P is the number of divisor pairs such that gcd(k(i),k(j)) >= 2.

Examples

			For n = 4, divisors of 4 are 1, 2, 4; thus a(4) = d(4+1) + d(4+2) + d(4+4) = d(5) + d(6) + d(8) = 2 + 4 + 4 = 10.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[DivisorSigma[0, d + n], {d, Divisors@n}]; Array[a, 67] (* Giovanni Resta, Mar 21 2017 *)
  • PARI
    for(n=1, 101, print1(sumdiv(n, d, numdiv(d + n)),", ")) \\ Indranil Ghosh, Mar 22 2017
    
  • Python
    from sympy import divisor_count, divisors
    def a(n):
        return sum(divisor_count(n + d) for d in divisors(n)) # Indranil Ghosh, Mar 22 2017

Extensions

a(21)-a(67) from Giovanni Resta, Mar 21 2017
Previous Showing 41-47 of 47 results.