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.

A281898 Numbers k such that k - floor(sqrt(k))^2 and 2k - floor(sqrt(2k))^2 are both squares.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 10, 13, 17, 20, 25, 29, 34, 40, 45, 50, 58, 65, 80, 85, 97, 100, 125, 130, 145, 170, 185, 200, 221, 225, 250, 260, 265, 290, 325, 340, 365, 377, 400, 425, 445, 450, 485, 493, 520, 530, 545, 580, 625, 650, 680, 685, 730, 754, 765, 785, 800, 841, 845, 890, 900
Offset: 1

Views

Author

Thomas Ordowski, Feb 01 2017

Keywords

Comments

The sequence is infinite: it contains an infinite subsequence { A000129(2*k)^2 + 1, k>=0 }. - Max Alekseyev, Feb 01 2017
Also A000129(2k+1)^2 is a subsequence.
There are precisely six primes in this sequence: 2, 5, 13, 17, 29, and 97.

Crossrefs

Cf. A000129, A076218 is a subsequence, A145016.

Programs

  • Mathematica
    Select[Range[0, 900], Times @@ Boole@ Map[IntegerQ@ Sqrt@ # &, # - Floor[Sqrt@ #]^2 &@ {#, 2 #}] == 1 &] (* Michael De Vlieger, Feb 02 2017 *)
    Select[Range[0,1000],AllTrue[{Sqrt[#-Floor[Sqrt[#]]^2],Sqrt[2#-Floor[ Sqrt[ 2#]]^2]},IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 25 2020 *)
  • PARI
    is(n)=issquare(n-sqrtint(n)^2) && issquare(2*n-sqrtint(2*n)^2) \\ Charles R Greathouse IV, Feb 01 2017

Extensions

More terms from Altug Alkan, Feb 01 2017