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.

A211191 List of odd values of k for which k^2+4 has a factor that is a square number larger than 1.

Original entry on oeis.org

11, 29, 39, 61, 89, 111, 139, 161, 189, 199, 211, 213, 239, 261, 289, 309, 311, 339, 361, 365, 367, 389, 393, 411, 439, 461, 489, 511, 521, 539, 561, 589, 611, 639, 647, 661, 689, 705, 711, 739, 759, 761, 789, 791, 811, 839, 861, 889, 911, 923, 925, 939, 943, 961, 985, 989
Offset: 1

Views

Author

Ruskin Harding, Feb 03 2013

Keywords

Comments

Or, (odd integers n such that) n^2 + 4 is not squarefree. - Zak Seidov, Feb 03 2013

Examples

			The first odd value of k for which k^2+4 has a square factor is 11: 11^2+4 = 125 = 5^2*5.
		

Crossrefs

Programs

  • Magma
    [k: k in [1..1000 by 2] | not IsSquarefree(k^2+4)]; // Bruno Berselli, Feb 06 2013
  • Mathematica
    Select[Range[11, 1000, 2], ! SquareFreeQ[#^2 + 4] &] (* Zak Seidov, Feb 03 2013 *)
  • PARI
    is_term(n) = !issquarefree(n^2+4);
    forstep (n=1,10^3,2, if (is_term(n), print1(n,", ")));
    /* Joerg Arndt, Feb 05 2013 */
    
  • Python
    b=1
    x=1
    for i in range(1, 100000, 2):
        for j in range(2, i):
           if ((i**2)+4)%(j**2)==0:
              a=i
              if a!=b:
                 b=a
                 print(x, i)
                 x=x+1