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.

A082523 Number of times k^2 + (n-k)^2 is a square for 1 <= k <= n-1.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 0, 0, 0
Offset: 2

Views

Author

CHAUVIN thierry (thierry.chauvin2(AT)wanadoo.fr), Apr 30 2003

Keywords

Comments

a(n) is not zero for n = 7, 14, 17, 21, 23, 28, ... : A118905. - Michel Marcus, Jun 09 2013

Crossrefs

Cf. A118905.

Programs

  • Magma
    [#[k:k in [1..n-1]|IsSquare(k^2+(n-k)^2)]:n in [2..90]]; // Marius A. Burtea, Jul 29 2019
  • Mathematica
    Table[Total[Boole[IntegerQ[Sqrt[#]]&/@Table[k^2+(n-k)^2,{k,n-1}]]],{n,2,90}] (* Harvey P. Dale, Aug 15 2017 *)
  • PARI
    a(n) = sum(k=1, n-1, issquare(k^2+(n-k)^2)) \\ Michel Marcus, Jun 09 2013
    

Extensions

Edited and extended by Michel Marcus, Jun 09 2013