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

A221671 Maximum number of squares in a non-constant arithmetic progression (AP) of length n.

Original entry on oeis.org

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

Views

Author

Jonathan Sondow, Jan 24 2013

Keywords

Comments

Let s(n;d,i) denote the number of squares in AP i, i+d, i+2d, ..., i+(n-1)d. Then a(n) is the maximum of s(n;d,i) over all such APs with d > 0.
González-Jiménez and Xarles (2013) compute a(n) up to a(52) = 12 using elliptic curves (see Table 2, where their Q(N) = a(N)). They do not seem to have noticed that a(n) = A193832(n) for n != 5 in the range where they computed a(n). I conjecture that this formula holds for all n != 5.
Bombieri & Zannier prove that a(n) << n^(3/5) (log n)^c for some constant c > 0. It is conjectured that a(n) ~ sqrt(8n/3). - Charles R Greathouse IV, Jan 21 2022

Examples

			The AP 1, 25, 49 = 1^2, 5^2, 7^2 shows that a(3) = 3. By Fermat and Euler, no four squares are in AP, so a(4) = 3 (see A216869). Then the AP 49, 169, 289, 409, 529 = 7^2, 13^2, 17^2, 409, 23^2 shows that a(5) = 4 (see A216870).
		

References

  • Andrew Granville, "Squares in arithmetic progressions and infinitely many primes", The American Mathematical Monthly 124, no. 10 (2017), pp. 951-954.

Crossrefs

Programs

  • Mathematica
    (* note that an extension to more than 52 terms may not be correct *) row[n_] := Join[Table[2*n-1, {2*n-1}], Table[2*n, {n}]]; row[2] = {3, 3, 4, 4, 4}; Flatten[Table[row[n], {n, 1, 6}]][[1 ;; 52]] (* Jean-François Alcover, Jan 25 2013, from formula *)

Formula

a(n) = A193832(n) for n < 53 except for n = 5.
a(n) >= A193832(n) for all n. (Proof. A193832 equals the partial sums of A080995 (characteristic function of generalized pentagonal numbers A001318) and a term in the AP 1+24*k is a square if and only if k = A001318(x) = x*(3*x-1)/2 for some x. See González-Jiménez and Xarles (2013) Lemma 2.)
a(A221672(n)) = n.

A221672 Length of shortest non-constant arithmetic progression (AP) containing n squares.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 16, 23, 27, 36, 41, 52
Offset: 1

Views

Author

Jonathan Sondow, Jan 28 2013

Keywords

Comments

Same as where records occur in A221671 (maximum number of squares in a non-constant AP of length n).
González-Jiménez and Xarles (2013) conjecture that for n >= 5 the sequence a(n)-1 equals the tail 7, 12, 15, 22, 26, 35, 40, 51, ... of A001318 (generalized pentagonal numbers k*(3*k-1)/2 for k = 0, +-1, +-2, ...). They prove it up to a(12)-1 = 51 = 6*(3*6-1)/2.
See A221671 for additional comments.
Also 8, 13, 16, 23, 27, 36, 41, 52 are where records occur for 8 <= n <= 52 in A193832 (number of squares in the arithmetic progression {24k + 1: 0 <= k <= n-1} [Granville]). - Jonathan Sondow, Dec 15 2017

Examples

			The AP 1, 25, 49 = 1^2, 5^2, 7^2 shows that a(n) = n for n = 1, 2, 3 (see A216869).
By Fermat and Euler, no four squares are in AP, so the AP 49, 169, 289, 409, 529 = 7^2, 13^2, 17^2, 409, 23^2 shows that a(4) = 5 (see Dickson and A216870).
As k*(3*k-1)/2 = 0, 1, 2, 5, 7 for k = 0, +-1, +-2, and 24*k*(3*k-1)/2 + 1 = (6*k-1)^2 is a square, the AP 24*n+1 for the 8 numbers n = 0, 1, ..., 7 contains 5 squares, so a(5) <= 8. González-Jiménez and Xarles (2013) prove a(5) > 7, so a(5) = 8.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Chelsea, New York, 1952, pp. 435-440.

Crossrefs

Formula

A221671(a(n)) = n.
a(n) <= A001318(n)+1. (Proof. As 24*k*(3*k-1)/2 + 1 = (6*k-1)^2, a term in the AP 24*m+1 is a square when m is in A001318. Thus the AP 24*m+1 for m = 0, 1, ..., A001318(n) contains n squares and has length A001318(n)+1.)

A216869 The smallest non-constant arithmetic progression of integer squares of maximal length three.

Original entry on oeis.org

1, 25, 49
Offset: 1

Views

Author

Jonathan Sondow, Nov 20 2012

Keywords

Comments

Bremner (2012): "Euler showed that the length of the longest arithmetic progression (AP) of integer squares is equal to three. [See Dickson.] Xarles (2011) investigated APs in number fields, and proved the existence of an upper bound K(d) for the maximal length of an AP of squares in a number field of degree d. He shows that K(2) = 5." See A216870.

Examples

			a(1) = 1^2, a(2) = 5^2, a(3) = 7^2.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Chelsea, New York, 1952, pp. 435-440.

Crossrefs

Formula

a(2) - a(1) = a(3) - a(2) = 24.
Showing 1-3 of 3 results.