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

A066243 Superseded by A063428.

Original entry on oeis.org

2, 2, 2, 4, 2, 6, 4, 6, 5, 10, 3, 12, 7, 6, 8, 16, 9, 18, 4, 12, 11, 22, 6, 20, 13, 18, 12, 28, 5
Offset: 2

Views

Author

Keywords

A063647 Number of ways to write 1/n as a difference of exactly 2 unit fractions.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 2, 4, 1, 7, 1, 4, 4, 4, 1, 7, 1, 7, 4, 4, 1, 10, 2, 4, 3, 7, 1, 13, 1, 5, 4, 4, 4, 12, 1, 4, 4, 10, 1, 13, 1, 7, 7, 4, 1, 13, 2, 7, 4, 7, 1, 10, 4, 10, 4, 4, 1, 22, 1, 4, 7, 6, 4, 13, 1, 7, 4, 13, 1, 17, 1, 4, 7, 7, 4, 13, 1, 13, 4, 4, 1, 22, 4, 4, 4, 10, 1, 22, 4, 7, 4, 4, 4
Offset: 1

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

Also number of ways to write 1/n as sum of exactly two distinct unit fractions. - Thomas L. York, Jan 11 2014
Also number of positive integers m such that 1/n + 1/m is a unit fraction. - Jon E. Schoenfield, Apr 17 2018
If 1/n = 1/b - 1/c then n = bc/(c-b) and 1/n = 1/(2n-b) + 1/(c+2n) (though it is also the case that 1/n = 1/(2n) + 1/(2n) equivalent to b = c = 0).
Also number of divisors of n^2 less than n. - Vladeta Jovovic, Aug 13 2001
Number of elements in the set {(x,y): x|n, y|n, xVladeta Jovovic, May 03 2002
Also number of positive integers of the form k*n/(k+n). - Benoit Cloitre, Jan 04 2002
This is similar to A062799, having the same first 29 terms. But they are different sequences.
If A001221(n) = omega(n) <= 2, then a(n) = A062799(n); if A001221(n) > 2, then a(n) > A062799(n). - Matthew Vandermast, Aug 25 2004
Number of r X s integer-sided rectangles such that r + s = 4n, r < s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 24 2020
Also number of integer-sided right triangles with 2n as a leg. Equivalent to the even indices of A046079. - Nathaniel C Beckman, May 14 2020; Jun 26 2020
a(n) is the number of positive integers k such that k+n divides k*n. - Thomas Ordowski, Dec 02 2024

Examples

			a(10) = 4 since 1/10 = 1/5 - 1/10 = 1/6 - 1/15 = 1/8 - 1/40 = 1/9 - 1/90.
a(12) = 7: the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the decompositions are (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 3), (3, 4).
		

Crossrefs

First twenty-nine terms identical to those of A062799.

Programs

  • Magma
    [(NumberOfDivisors(n^2)-1)/2 : n in [1..100]]; // Vincenzo Librandi, Apr 18 2018
  • Mathematica
    Table[(Length[Divisors[n^2]] - 1)/2, {n, 1, 100}]
    (DivisorSigma[0,Range[100]^2]-1)/2 (* Harvey P. Dale, Apr 15 2013 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n^2,if((n*i)%(i+n),0,1)),","))
    
  • PARI
    a(n)=numdiv(n^2)\2 \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

a(n) = (tau(n^2)-1)/2.
a(n) = A018892(n)-1. If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1+1)(2*a2+1)...(2*at+1)-1)/2.
If n is prime a(n)=1. Conjecture: (1/n)*Sum_{i=1..n} a(i) = C*log(n)*log(log(n)) + o(log(n)) with C=0.7... [The conjecture is false. See the plot and the asymptotic formula below. - Amiram Eldar, Oct 03 2024]
Bisection of A046079. - Lekraj Beedassy, Jul 09 2004
a(n) = Sum_{i=1..2*n-1} (1 - ceiling(i*(4*n-i)/(4*n-2*i)) + floor(i*(4*n-i)/(4*n-2*i))). - Wesley Ivan Hurt, Apr 24 2020
Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 - zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Oct 03 2024

A063427 a(n) is the smallest positive integer k such that n*k/(n+k) is an integer.

Original entry on oeis.org

2, 6, 4, 20, 3, 42, 8, 18, 10, 110, 4, 156, 14, 10, 16, 272, 9, 342, 5, 28, 22, 506, 8, 100, 26, 54, 21, 812, 6, 930, 32, 66, 34, 14, 12, 1332, 38, 78, 10, 1640, 7, 1806, 44, 30, 46, 2162, 16, 294, 50, 102, 52, 2756, 27, 66, 8, 114, 58, 3422, 12, 3660, 62, 18, 64, 104
Offset: 2

Views

Author

Henry Bottomley, Jul 19 2001

Keywords

Comments

This produces the smallest positive integer value for n*k/(n+k).
Equivalently, smallest c such that 1/n + 1/c = 1/b has integer solutions.
Largest c is 1/(n(n-1)) since 1/n + 1/(n(n-1)) = 1/(n-1).
Let L(x,y)=x+y be the "basic" linear form. Let Q(x,y) = x^2 + x*y + y^2 be the "basic" quadratic form. Let C(x,y) = x^3 + y^3 + x^2*y + x*y^2 + x*y + x^2 + y^2 + x + y be the "basic" cubic form. Then a(n) = min(x/Q(x,n)=0 mod L(x,n)) = min(x/C(x,n) = 0 mod L(x,n)). - Benoit Cloitre, Jan 02 2002
For p=prime, a(p^k) = p^k*(p-1). - Leroy Quet, Jan 25 2007
a(n) = n*(d(i)-d(i-1))/d(i-1), where d(i) is the i-th divisor of n that minimizes (d(i)-d(i-1))/d(i-1) with i>=2. In general, let f(n) be an integer function, then n*f(n)/(n+f(n))=c, c positive integer, has a solution only if f(n) >= n*(d(i)-d(i-1))/d(i-1). - Ctibor O. Zizka, Sep 17 2015

Examples

			a(6) = 3 because 6*3/(6+3)=2 is the smallest integer of the form 6*k/(6+k).
a(10) = 10 since 1/10 + 1/10 = 1/5, 1/10 + 1/15 = 1/6, 1/10 + 1/40 = 1/8, 1/10 + 1/90 = 1/9 and so the first sum provides the value.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1;While[!IntegerQ[(k n)/(k+n)],k++];k,{n,2,70}] (* Harvey P. Dale, Jun 24 2011 *)
  • PARI
    a(n) = { my(k=1); while (n*k%(n + k), k++); k } \\ Harry J. Smith, Aug 20 2009

Formula

a(n) = n*A063428(n)/(n-A063428(n)).

Extensions

New description from Benoit Cloitre, Dec 30 2001
Entry revised by N. J. A. Sloane, Feb 13 2007
Definition revised by Franklin T. Adams-Watters, Aug 07 2009

A339144 a(n) is the smallest positive integer such that n*a(n) contains n+a(n) as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

-1, 2, -1, 68, -1, -1, -1, 44, -1, 890, 110, 60, 44, 35, 30, 27, 25, 23, 22, 20, 929, 19, 18, 88, 17, -1, 16, 16, 68, 15, 15, 60, 58, 56, 14, 14, 14, 371, 48, 360, 336, 562, 9104, 8, 13, 13, 283, 39, 269, 450, 37, 452, 245, 18, 679, 34, 225, 33, 2053, 12, 12, 12, 12, 12, 30, 369, 889, 4, 16961
Offset: 1

Views

Author

Scott R. Shannon, Nov 25 2020

Keywords

Comments

For n = 1, 3, 5, 6, 7, 9, 26 no value has been found for which n*a(n) contains n + a(n) as a substring (obviously true for n = 1) for a(n) up to 5x10^10. It is likely, although unproven, that this is the complete list of values for which a(n) = -1.
The sequence values display erratic behavior. Most of the term values appear random but there are ranges of n values with the same value. The largest such range for the first one million terms is a(501000) to a(501499), 500 terms, all of which have a(n) = 1002. Patterns also appear for n value corresponding to multiples of powers-of-ten. For example if n=10^k then a(n) = 89*10^k. The largest value in the first one million terms is a(554635) = 879948670.

Examples

			a(2) = 2 as 2*2 = 4 which contains 2 + 2 = 4 as a substring.
a(4) = 68 as 4*68 = 272 which contains 4+68 = 72 as a substring.
a(69) = 16961 as 69*16961 = 1170309 which contains 69+16961 = 17030 as a substring.
a(501000) = 1002 as 501000*1002 = 502002000 which contains 501000+1002 = 502002 as a substring. This is the first of 500 consecutive terms with a(n) = 1002.
a(554635) = 879948670 as 554635*879948670 = 488050330585450 which contain 554635+879948670 = 880503305 as a substring. This is the largest value of a(n) for the first one million terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), Str(n+k)) > 1;
    a(n) = {if (vecsearch([1, 3, 5, 6, 7, 9, 26], n), return (-1)); my(k=1); while (! isok(k, n), k++); k;} \\ Michel Marcus, Dec 02 2020 and Jan 23 2021

A191973 Irregular triangle read by rows: row n consists of n and the positive integers m where m-n divides m*n.

Original entry on oeis.org

1, 2, 1, 2, 3, 4, 6, 2, 3, 4, 6, 12, 2, 3, 4, 5, 6, 8, 12, 20, 4, 5, 6, 10, 30, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 24, 42, 6, 7, 8, 14, 56, 4, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 6, 8, 9, 10, 12, 18, 36, 90, 5, 6, 8, 9, 10, 11, 12, 14, 15, 20, 30, 35, 60
Offset: 1

Views

Author

Nathaniel Johnston, Jun 22 2011

Keywords

Comments

The maximum term of the n-th row is n*(n+1). The minimum term of the n-th row seems to be A063428(n) if n>=2. The length of row n is A146564(n) + 1.

Examples

			The triangle begins:
1 2
1 2 3 4  6
2 3 4 6  12
2 3 4 5  6  8  12 20
4 5 6 10 30
2 3 4 5  6  7  8  9  10 12 15 18 24 42
6 7 8 14 56
...
		

Crossrefs

Cf. A162821 (row 30), A162822 (row 36), A162823 (row 42), A162824 (row 48), A162825 (row 60), A127730.

Programs

  • Maple
    for n from 1 to 10 do for m from 1 to n*(n+1) do if(n=m or m*n mod (m-n) = 0)then printf("%d, ",m): fi: od: od:

A339403 a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

0, -1, 2, 24, 37, 26, 34, 35, 57, 9, -1, 12, 11, 45, 193, 228, 28, 51, 23, 44, 841, 11, 27, 18, 3, 626, 5, 22, 16, 46716, 56, 41, 33, 32, 6, 7, 21, 4, 3, 24, 592, 31, 7, 619, 19, 13, 38, 2, 117, 5, 463, 17, 34, 308, 33, 36, 30, 8, 31, 4, 23, 21, 648, 124, 921, 903, 386, 395, 4, 334, 755, 31, 563
Offset: 0

Views

Author

Scott R. Shannon, Dec 03 2020

Keywords

Comments

This is a variation of A339144 where, instead of the n*a(n) containing n+a(n) as a substring, it contains the reverse of the string n+a(n), including any leading zeros.
Based on a search limit of 5x10^9 up to n = 100000 the values of n for which no a(n) is found are n = 10^k, with k>=0, and 17500. A test of 175000 and 1750000 also found no a(n) indicating that all values of the form 17500*10^k may have no term for a(n).
It is found that when n = 200*10^k, with k>=0, the corresponding value for a(n) is significantly larger than neighboring terms. As an example a(20000) = 666843331, which is the largest term up to n = 100000.
Unlike A339144, which contains multiple consecutive terms with the same value of a(n), in this sequence the largest consecutive run of the same a(n) in the first 100000 terms is only two. The first term of these pairs occurs at n = 110, 121, 2717, 4368, 7916, 10100, 11211, 13231, 17271, 44573, 63529.

Examples

			a(3) = 24 as 3*24 = 72 which contains reverse(3+24) = reverse(27) = 72 as a substring.
a(6) = 34 as 6*34 = 204 which contains reverse(6+34) = reverse(40) = 04 as a substring. Note the leading zero is included.
a(29) = 46716 as 29*46716 = 1354764 which contains reverse(29+4671) = reverse(46745) = 54764 as a substring.
a(110) = 11 as 110*11 = 1210 which contains reverse(110+11) = reverse(121) = 121 as a substring. This is the first of two consecutive terms with a(n) = 11.
a(20000) = 666843331 as 20000*666843331 = 13336866620000 which contains reverse(20000+666843331) = reverse(666863331) = 133368666 as a substring. This is the largest value in the first 100000 terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), concat(Vecrev(Str(n+k)))) > 1;
    ispt(n) = my(t); ispower(n,,&t) && (t==10);
    a(n) = {if ((n==1) || (n==10) || ispt(n), return (-1)); my(k=0); while (! isok(n, k), k++); k;} \\ Michel Marcus, Jan 22 2021

A063649 Largest b such that 1/n=1/c+1/b has integer solutions with c>b.

Original entry on oeis.org

3, 4, 6, 6, 10, 8, 12, 12, 15, 12, 21, 14, 21, 24, 24, 18, 30, 20, 36, 30, 33, 24, 42, 30, 39, 36, 44, 30, 55, 32, 48, 44, 51, 60, 63, 38, 57, 52, 72, 42, 78, 44, 66, 72, 69, 48, 84, 56, 75, 68, 78, 54, 90, 80, 105, 76, 87, 60, 110, 62, 93, 112, 96, 90, 110, 68, 102, 92, 120
Offset: 2

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

Smallest b is (n+1) since 1/n = 1/(n(n+1))+1/(n+1).

Examples

			a(10)=15 since 1/10=1/20+1/20=1/30+1/15=1/35+1/14=1/60+1/12=1/110+1/11, but the first sum does not have c>b, leaving the second sum to provide the value.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local b;
      for b from 2*n-1 by -1 do
         if n*b mod (b-n) = 0 then return b fi
    od
    end proc:
    map(f, [$2..100]); # Robert Israel, Dec 01 2019
  • Mathematica
    a[n_] := n + SelectFirst[Divisors[n^2] // Reverse, #Jean-François Alcover, Jun 07 2020 *)

Formula

a(n) = n*A063648(n)/(A063648(n)-n) = 2n-A063428(n).
From Robert Israel, Dec 01 2019: (Start)
a(n) = n + A063717(n).
a(n) = n + 1 if and only if n is prime. (End)

A063717 a(n) is the greatest divisor of n^2 that is less than n.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 4, 3, 5, 1, 9, 1, 7, 9, 8, 1, 12, 1, 16, 9, 11, 1, 18, 5, 13, 9, 16, 1, 25, 1, 16, 11, 17, 25, 27, 1, 19, 13, 32, 1, 36, 1, 22, 27, 23, 1, 36, 7, 25, 17, 26, 1, 36, 25, 49, 19, 29, 1, 50, 1, 31, 49, 32, 25, 44, 1, 34, 23, 50, 1, 64, 1, 37, 45, 38, 49, 52, 1, 64, 27, 41
Offset: 2

Views

Author

Vladeta Jovovic, Aug 12 2001

Keywords

Comments

Smaller of two distinct numbers with minimum sum whose geometric mean is n. E.g., a(12) = 9 as 12^2 = 144 = 1*144 = 2*72 = 3*48 = 4*36 = 6*24 = 8*18 = 9*16, etc. - Amarnath Murthy, Feb 15 2003

Examples

			a(45)=27 because set of divisors of 45^2 is {1, 3, 5, 9, 15, 25, 27, 45, 75, 81, 135, 225, 405, 675, 2025} and the greatest element of the set less than 45 is 27.
		

Crossrefs

A063649(n) = n + a(n), A063718(n) = n^2/A063717(n), A063428(n) = n - a(n).
Cf. A063718.

Programs

  • Maple
    with(numtheory): for n from 2 to 200 do a := divisors(n^2): b := a[(tau(n^2)-1)/2]: printf(`%d,`,b); od:
  • Mathematica
    f[n_] := Module[{dn2 = Divisors[n^2]}, Last[Take[dn2, {1, Flatten[Position[dn2, n]][[ 1]] - 1}]]]; Table[f[i], {i, 2, 85}]
    Table[Select[Divisors[n^2],#Harvey P. Dale, Apr 23 2016 *)
  • PARI
    { for (n=2, 1000, d=divisors(n^2); write("b063717.txt", n, " ", d[length(d)\2]) ) } \\ Harry J. Smith, Aug 28 2009

A063648 Smallest c such that 1/n=1/c+1/b has integer solutions with c>b.

Original entry on oeis.org

6, 12, 12, 30, 15, 56, 24, 36, 30, 132, 28, 182, 42, 40, 48, 306, 45, 380, 45, 70, 66, 552, 56, 150, 78, 108, 77, 870, 66, 992, 96, 132, 102, 84, 84, 1406, 114, 156, 90, 1722, 91, 1892, 132, 120, 138, 2256, 112, 392, 150, 204, 156, 2862, 135, 176, 120, 228, 174
Offset: 2

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

Largest c is n(n+1) since 1/n=1/(n(n+1))+1/(n+1)

Examples

			a(10)=30 since 1/10=1/20+1/20=1/30+1/15=1/35+1/14=1/60+1/12=1/110+1/11, but the first sum does not have c>b, leaving the second sum to provide the value.
		

Crossrefs

Formula

a(n) =n*A063649(n)/(A063649(n)-n) =A063427(n)+2n.

A127731 Triangle read by rows, where row n consists of the r's where r = (n*m)/(n+m) and the m's are positive integers such that (n+m) divides (n*m).

Original entry on oeis.org

1, 2, 2, 3, 4, 2, 3, 4, 5, 6, 4, 6, 7, 6, 8, 5, 6, 8, 9, 10, 3, 4, 6, 8, 9, 10, 11, 12, 7, 10, 12, 13, 6, 10, 12, 14, 8, 12, 14, 15, 16, 6, 9, 12, 14, 15, 16, 17, 18, 4, 10, 12, 15, 16, 18, 19, 12, 14, 18, 20, 11, 18, 20, 21, 22, 6, 8, 12, 15, 16, 18, 20, 21, 22, 23, 20, 24, 13, 22, 24, 25
Offset: 2

Views

Author

Leroy Quet, Jan 26 2007

Keywords

Comments

The maximum term of the n-th row, for n >= 2, is (n-1). The minimum term of row n is A063428(n), for n >= 3. Row n contains A063647(n) terms (according to a comment by Benoit Cloitre). For p prime, row p^k has k terms. (Each term in row p^k is of the form p^(k-j)*(p^j -1), 1<=j<=k.)

Examples

			Row 6 is (2,3,4,5) because row 6 of irregular array A127730 is (3,6,12,30); and (6*3)/(6+3) = 2, (6*6)/(6+6) = 3, (6*12)/(6+12) = 4 and (6*30)/(6+30) = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[Table[n*m/(n + m), {m, n^2}], IntegerQ];Table[f[n], {n, 2, 26}] // Flatten (* Ray Chandler, Feb 13 2007 *)

Extensions

Extended by Ray Chandler, Feb 13 2007
Showing 1-10 of 10 results.