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.

User: Vale Murthy

Vale Murthy's wiki page.

Vale Murthy has authored 3 sequences.

A243842 Pair deficit of the most equal partition of n into two parts using standard rounding of the expectations of n, floor(n/2) and n-floor(n/2), assuming equal likelihood of states defined by the number of 2-cycles.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 2, 1, 1, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 0, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1
Offset: 0

Author

Rajan Murthy and Vale Murthy, Jun 12 2014

Keywords

Comments

The expectation for n = 2 is 0.5 so this is the first and only integer n for which the convention of rounding a half to an even number is pertinent. This affects a(2), a(3), a(4), and a(5). For n>2, twice the expectation, 2*E(n) must be an odd integer for this situation to arise. 2*E(n) = n*(n-1)*I(n-2)/I(n) for n>=2, where I(n) = A000085(n).
First notice that gcd(I(n), I(n-2)) = gcd(I(n-1) + (n-1)*I(n-2), I(n-2)) = gcd(I(n-1), I(n-2)). Now, suppose that there is an odd prime factor s that divides both I(m-1) and I(m-2) for some m. This would then imply that I(m), I(m+1), I(m+2), ... would all be a multiple of s, i.e., I(n) mod s would be zero for all n greater than or equal to m. A result of Chowla implies that I(n) mod s equals 1 infinitely often for any fixed odd prime s. This is a contradiction of the initial supposition. In other words, there is no odd prime factor that divides both I(m-1) and I(m-2), hence no odd prime factor in common between I(m) and I(m-2).
We can rewrite 2*E(n) as n*(n-1)*(2^a)*p/((2^b)*q), where gcd(p,q) = 1 and both p and q are odd. Using the result from Kim regarding b as a function of n, it can be shown that q > 2^(n/2) > n*(n-1) for all n greater than or equal to 16. Since q is larger than n*(n-1) we can reduce n*(n-1)/q to r/q', where gcd(r,q') = 1, q' odd, and q' is greater than 1. Let Z be an odd prime factor of q'. Z is not a divisor of r, p, or 2^a. Since Z is prime this implies that Z is not a divisor of the product r*2^a*p. Now rewrite 2*E(n) = r*(2^a)*p/(q'*(2^b)) as 2*E(n) = r*(2^a)*p/(Z*q"*(2^b)), where Z is an odd prime such that q' = Z*q". Let us suppose that 2*E(n) is an integer then 2*E(n)*Z*q"*(2^b) = r*(2^a)*p. This implies that Z is a divisor of r*(2^a)*p. This is a contradiction. We conclude that 2*E(n) is not an integer for n greater than or equal to 16. The remaining cases for 2*E(n) between 2 and 16 can be verified numerically.
Interestingly, given the recurrence relation I(n) = I(n-1) + (n-1)*I(n-2), 2*E(n) = n - n*I(n-1)/I(n). Defining J(n) as I(n)/I(n-1), this yields 2*E(n) = n - n/J(n) where J(n) = 1+(n-1)/J(n-1). n/J(n) happens to be the finite continued fraction n/1+ (n-1)/1+ ...3/1+ 2/(1+1).

Examples

			Trivially, for n = 0,1 no pairs are possible so a(0) and a(1) are 0.
For n = 2, the expectation, E(n), equals 0.5. So a(2) = round(E(2)) - round(E(1)) - round(E(1)) = 0.
For n = 5 = 2 + 3, E(5) = 20/13, E(2) = 0.5 and E(3) = 0.75 and a(5) = round(E(5)) - round(E(2)) - round(E(3)) = 1.
		

References

  • Oskar Perron, Die Lehre von den Kettenbrüchen Band I, II, B. G. Teubner, 1954.

Crossrefs

Cf. A162970 (numerator for calculating the expected value).
Cf. A000085 (denominator for calculating the expected value).
Cf. A243840 (analogous using floor rounding).
Cf. A243841 (analogous using ceiling rounding).

Formula

Let Er(n) = round(A162970(n)/A000085(n)). Then a(n) = Er(n) - Er(floor(n/2)) - Er(n-floor(n/2)).

A229904 Number of additional unit squares completely encircled in the first quadrant of a Cartesian grid by a circle centered at the origin as the radius squared increases from one sum of two square integers to the next larger sum of two square integers.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 4, 2, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 4, 2, 2, 2, 2
Offset: 1

Author

Rajan Murthy and Vale Murthy, Dec 19 2013

Keywords

Comments

From Mohammed Yaseen, Apr 23 2025: (Start)
a(n) is the number of solutions to x^2 + y^2 = A000404(n), x,y,z >= 1.
a(n) are the degeneracies of the energy levels of a particle in a two-dimensional box in quantum mechanics. See A014465 for the three-dimensional box case. (End)

Examples

			When the radius increases from 0 to sqrt(2), one square is completely encircled (a(1)).  When the radius increases from sqrt(2) to sqrt(3), two more squares are encircled (a(2)).  When the radius increases from sqrt(45) to sqrt(50), three more squares are encircled(a(18)).
		

Crossrefs

First differences of A232499.
Radii are the square roots of A000404.
The first differences must be odd at positions given in A024517 by proof by symmetry as r^2=2*n^2 is on the x=y line.

Formula

a(n) = A232499(n) - A232499(n-1) for n>1, a(1) = A232499(1).

A232499 Number of unit squares, aligned with a Cartesian grid, completely within the first quadrant of a circle centered at the origin ordered by increasing radius.

Original entry on oeis.org

1, 3, 4, 6, 8, 10, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 30, 33, 35, 37, 39, 41, 45, 47, 48, 50, 52, 54, 56, 60, 62, 64, 66, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 89, 90, 94, 96, 98, 102, 104, 106, 108, 110, 112, 114, 115, 117, 119, 123, 125, 127, 129, 131
Offset: 1

Author

Rajan Murthy and Vale Murthy, Nov 24 2013

Keywords

Comments

The interval between terms reflects the number of ways a square integer can be partitioned into the sum of two square integers in an ordered pair. As examples, the increase from a(1) to a(2) from 1 to 3 is due to the inclusion of (1,2) and (2,1); and the increase from a(2) to a(3) is due to the inclusion of (2,2). Larger intervals occur when there are more combinations, such as, between a(17) and a(18) when (1,7), (7,1), and (5,5) are included.

Examples

			When radius of the circle exceeds 2^(1/2), one square is completely within the circle until the radius reaches 5^(1/2) when three squares are completely within the circle.
		

Crossrefs

First differences are in A229904.
The first differences must be odd at positions given in A024517 by proof by symmetry as r^2=2*n^2 is on the x=y line.
The radii corresponding to the terms are given by the square roots of A000404.
Cf. A237707 (3-dimensional analog), A239353 (4-dimensional analog).

Programs

  • Mathematica
    (* An empirical solution *) terms = 100; f[r_] := Sum[Floor[Sqrt[r^2 - n^2]], {n, 1, Floor[r]}]; Clear[g]; g[m_] := g[m] = Union[Table[f[Sqrt[s]], {s, 2, m }]][[1 ;; terms]]; g[m = dm = 4*terms]; g[m = m + dm]; While[g[m] != g[m - dm], Print[m]; m = m + dm]; A232499 = g[m]  (* Jean-François Alcover, Mar 06 2014 *)