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

A159899 A variant of A067721 with a different beginning; see A067721 for further information.

Original entry on oeis.org

1, 4, 2, 9, 1, 3, 8, 25, 4, 36, 18, 1, 2, 64, 6, 81, 16, 4, 50, 121, 1, 20, 72, 9, 36, 196, 2, 225, 4, 11, 128, 1, 12, 324, 162, 13, 5, 400, 8, 441, 100, 3, 242, 529, 1, 63, 40, 17, 144, 676, 18, 9, 7, 19, 392, 841, 4, 900, 450, 12, 8, 16, 22, 1089, 256, 23, 2, 1225
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 25 2009

Keywords

Crossrefs

Cf. A067721.

A115878 a(n) is the number of positive solutions of the Diophantine equation x^2 = y(y+n).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 4, 2, 1, 2, 1, 1, 4, 1, 1, 4, 2, 1, 3, 1, 1, 4, 1, 3, 4, 1, 4, 2, 1, 1, 4, 4, 1, 4, 1, 1, 7, 1, 1, 7, 2, 2, 4, 1, 1, 3, 4, 4, 4, 1, 1, 4, 1, 1, 7, 4, 4, 4, 1, 1, 4, 4, 1, 7, 1, 1, 7, 1, 4, 4, 1, 7, 4, 1, 1, 4, 4, 1, 4, 4, 1, 7, 4, 1, 4, 1, 4, 10, 1, 2, 7, 2, 1, 4
Offset: 1

Views

Author

Giovanni Resta, Feb 02 2006

Keywords

Comments

Number of divisors d of n^2 such that d^2 < n^2 and n^2/d == d (mod 4). - Antti Karttunen, Oct 06 2018, based on Robert Israel's Jun 27 2014 comment in A115880.
For odd n, a(n) can be computed from the prime signature. - David A. Corneth, Oct 07 2018
Number of r X s rectangles with integer side lengths such that r + s = n, r < s and (s-r) | (s*r). - Wesley Ivan Hurt, Apr 24 2020

Examples

			a(15) = 4 since there are 4 solutions (x,y) to x^2 = y(y+15), namely (4,1), (10,5), (18, 12) and (56, 49).
Note how each x is obtained from each such divisor pair n2/d and d of n2 as (n2/d - d)/4, when their difference is a positive multiple of four, thus in case of n2 = 15^2 = 225 we get (225/1 - 1)/4 = 56, (225/3 - 3)/4 = 18, (225/5 - 5) = 10 and (225/9 - 9)/4 = 4. - _Antti Karttunen_, Oct 06 2018
a(96) = 10. We compute P, the largest power of 2 dividing n = 96. Then compute min(P, 4) and divide n by it. This gives 96/4 = 24. Then find the number of divisors of 24^2, which is 21. Dividing by 2 rounding down to the nearest integer gives 10, the value of a(96). - _David A. Corneth_, Oct 06 2018
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Boole[d^2 < n^2 && Mod[n^2/d-d, 4] == 0], {d, Divisors[n^2]}];
    Array[a, 102] (* Jean-François Alcover, Feb 27 2019, from PARI *)
  • PARI
    A115878(n) = { my(n2 = n^2); sumdiv(n2,d,((d*d)Antti Karttunen, Oct 06 2018
    
  • PARI
    a(n) = my(v=min(2, valuation(n,2))); numdiv((n>>v)^2)>>1 \\ David A. Corneth, Oct 06 2018
    
  • Python
    from itertools import takewhile
    from sympy import divisors
    def A115878(n): return sum(1 for d in takewhile(lambda d:dChai Wah Wu, Aug 21 2024

Formula

From David A. Corneth, Oct 07 2018: (Start)
a((2k+1) * 2^m) = floor(tau((2k + 1) ^ 2) / 2) for m <= 2.
a((2k+1) * 2^m) = (2m - 3) * a(2k+1) + (m-2) for m > 2. (End)
a(n) = Sum_{i=1..floor((n-1)/2)} (1 - ceiling(i*(n-i)/(n-2*i)) + floor(i*(n-i)/(n-2*i))). - Wesley Ivan Hurt, Apr 24 2020

A115879 a(n) is the least positive x satisfying the Diophantine equation x^2=y(y+n). a(n)=0 if there are no solutions.

Original entry on oeis.org

0, 0, 2, 0, 6, 4, 12, 3, 6, 12, 30, 8, 42, 24, 4, 6, 72, 12, 90, 24, 10, 60, 132, 5, 30, 84, 18, 48, 210, 8, 240, 12, 22, 144, 6, 24, 342, 180, 26, 15, 420, 20, 462, 120, 12, 264, 552, 7, 84, 60, 34, 168, 702, 36, 24, 21, 38, 420, 870, 16, 930, 480, 8, 24, 36, 44
Offset: 1

Views

Author

Giovanni Resta, Feb 02 2006

Keywords

Examples

			a(15)=4 since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The least x values is 4, from (x,y)=(4,1).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local q;
      q:= max(select(t -> t^2 < n^2 and n^2/t - t mod 4 = 0, numtheory:-divisors(n^2)));
      if q = -infinity then 0 else (n^2/q - q)/4 fi;
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 21 2025
  • Python
    from itertools import takewhile
    from collections import deque
    from sympy import divisors
    def A115879(n): return -(a:=next(iter(deque((d for d in takewhile(lambda d:d>2 # Chai Wah Wu, Aug 21 2024

A115880 Largest positive x satisfying the Diophantine equation x^2 = y*(y+n), a(n)=0 if there are no solutions.

Original entry on oeis.org

0, 0, 2, 0, 6, 4, 12, 3, 20, 12, 30, 8, 42, 24, 56, 15, 72, 40, 90, 24, 110, 60, 132, 35, 156, 84, 182, 48, 210, 112, 240, 63, 272, 144, 306, 80, 342, 180, 380, 99, 420, 220, 462, 120, 506, 264, 552, 143, 600, 312, 650, 168, 702, 364, 756, 195, 812, 420, 870
Offset: 1

Views

Author

Giovanni Resta, Feb 02 2006

Keywords

Comments

Notice that x^2 = y*(y+n) is equivalent to (n+2*y+2*x)*(n+2*y-2*x) = n^2. We take the factorization of n^2 into two factors congruent mod 4 where one is as small as possible and the other is as large as possible. For n == 0 mod 4 the factors are 4 and n^2/4, for n == 2 mod 4 they are 2 and n^2/2, for n odd they are 1 and n^2. - Robert Israel, Jun 27 2014

Examples

			a(15)=56 since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The largest x is 56, from (x,y)=(56,49).
		

Crossrefs

Programs

  • Mathematica
    Table[Max[x/.Solve[{x^2==y(y+n),x>0},{x,y},Integers]],{n,1,100}]/.x->0 (* Vaclav Kotesovec, Jun 26 2014 *)
  • Python
    def A115880(n):
        a, b = divmod(n,4)
        return (a**2-1,(c:=a<<1)*(c+1),c*(a+1),c*(c+3)+2)[b] # Chai Wah Wu, Aug 21 2024

Formula

Empirical g.f.: x^3*(x^9-2*x^6-3*x^5-6*x^4-4*x^3-6*x^2-2) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jun 26 2014
a(4*j) = j^2 - 1,
a(4*j+1) = 4*j^2+2*j,
a(4*j+2) = 2*j^2+2*j,
a(4*j+3) = 4*j^2+6*j+2. (see Comments) - Robert Israel, Jun 27 2014

A115881 a(n) is the largest positive y satisfying the Diophantine equation x^2=y(y+n). a(n)=0 if there are no solutions.

Original entry on oeis.org

0, 0, 1, 0, 4, 2, 9, 1, 16, 8, 25, 4, 36, 18, 49, 9, 64, 32, 81, 16, 100, 50, 121, 25, 144, 72, 169, 36, 196, 98, 225, 49, 256, 128, 289, 64, 324, 162, 361, 81, 400, 200, 441, 100, 484, 242, 529, 121, 576, 288, 625, 144, 676, 338, 729, 169, 784, 392, 841, 196
Offset: 1

Views

Author

Giovanni Resta, Feb 02 2006

Keywords

Comments

The corresponding least y is given by A067721(n).

Examples

			a(15)=49, since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The largest y is 49, from (x,y)=(56,49).
		

Crossrefs

Programs

  • Mathematica
    Table[Max[y/.Solve[{x^2==y*(y+n),y>0},{x,y},Integers]],{n,1,100}]/.y->0 (* Vaclav Kotesovec, Jun 26 2014 *)
  • Python
    def A115881(n):
        a, b = divmod(n,4)
        return ((c:=a**2)-(a<<1)+1,(d:=c<<2),c<<1,d+(a<<2)+1)[b] # Chai Wah Wu, Aug 21 2024

Formula

Empirical g.f.: -x^3*(x^9+x^8+2*x^7+4*x^6+x^5+6*x^4+2*x^3+4*x^2+1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jun 26 2014
From empirical g.f.: a(n) = 1/2 - n/2 + 11*n^2/64 + (1/4 - 1/32*n^2) * (2*floor(n/4) + 2*floor((n+1)/4) - n + 1) + (1/4 - 5/64*n^2)*(-1)^n. - Vaclav Kotesovec, Jun 26 2014
From Chai Wah Wu, Aug 21 2024: (Start)
a(4*j) = j^2 - 2*j + 1,
a(4*j+1) = 4*j^2,
a(4*j+2) = 2*j^2,
a(4*j+3) = 4*j^2+4*j+1 (see A115880).
(End)

A173636 Number of positive solutions of equation x(x+n)=y*y.

Original entry on oeis.org

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

Views

Author

Carmine Suriano, Nov 23 2010

Keywords

Comments

The solution x=y=0 is not counted.
Same as A115878 except for a(0). - Georg Fischer, Oct 12 2018

Examples

			a(9)=2 since x(x+9)=y*y has 2 solutions: x=3, y=6 and x=16, y=20.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[Length[{ToRules[Reduce[x (x + n) == y^2 && x > 0 && y > 0, {x, y}, Integers]]}], {n, 100}]]

Formula

a(n) = A176835(n)-1. - R. J. Mathar, Nov 23 2010
Showing 1-6 of 6 results.