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.

A230312 Squares which cannot be written as the sum of a smaller nonzero square and twice a triangular number.

Original entry on oeis.org

1, 4, 9, 25, 49, 64, 100, 144, 169, 324, 400, 729, 784, 1089, 1369, 1764, 2025, 2209, 3025, 3364, 3600, 3844, 3969, 4225, 4489, 5329, 5625, 6084, 6400, 7225, 7744, 8100, 8464, 10404, 10609, 11025, 12544, 13225, 13924, 14400, 15625, 16384, 16900
Offset: 1

Views

Author

Kieren MacMillan, Dec 20 2013

Keywords

Comments

The conjecture a(n) = A001912(n)^2 (mentioned in the formula part) is easy. In fact, any prime divisor of 4*n^2 + 1 is congruent to 1 modulo 4 and hence it can be written as a sum of two squares. Thus 4*n^2 + 1 = (2*n)^2 + 1^2 is composite if and only if it can be written as a sum of two squares in at least two ways. So the conjecture follows immediately. - Zhi-Wei Sun, Feb 23 2014
Positive squares that are the sum of two triangular numbers in exactly one way. Note that each positive square is the sum of two consecutive triangular numbers since A000217(n) + A000217(n+1) = n*(n+1)/2 + (n+1)*(n+2)/2 = (n+1)^2. - Altug Alkan, Jul 06 2016

Examples

			16 is not in the sequence because it can be expressed as 2^2 + 2 * 6.
But there is no such expression for 25 and hence it is in the sequence.
		

Crossrefs

Cf. A001912.

Programs

  • Mathematica
    A230312 = Reap[For[k = 1, k < 200, k++, n = k^2; If[Reduce[a > 0 && b > 0 && n == a^2 + b * (b + 1), {a, b}, Integers] == False, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Dec 03 2014 *)
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(4*n^2+1), print1(n^2, ", "))); \\ Altug Alkan, Jul 06 2016

Formula

Conjecture: a(n) = A001912(n)^2, that is, squares of numbers n such that 4n^2 + 1 is prime. - Alonso del Arte, Dec 20 2013