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.

A151991 Numbers k with the property that (k-x)*(k-y)*(k-z) = x*y*z has no integer solutions 0 < x,y,z < k.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 57, 59, 61, 67, 69, 71, 73, 79, 81, 83, 87, 89, 93, 95, 97, 101, 103, 107, 109, 111, 113, 115, 121, 123, 125, 127, 129, 131, 133, 137, 139, 141, 145, 147, 149, 151, 155, 157, 159
Offset: 1

Views

Author

Nurdin Takenov (greanvert(AT)gmail.com), Sep 14 2009

Keywords

Comments

All odd primes are terms of this sequence.

Examples

			15 is not a term of this sequence because (15-x)*(15-y)*(15-z) = x*y*z has the solution (5,5,12).
		

Crossrefs

Cf. A065091 (odd primes).

Programs

  • PARI
    is(n)=for(x=1,n-1,for(y=1,x, my(t=(n-x)*(n-y),z=t*n/(x*y+t)); if(denominator(z)==1 && 0 < z && z < n, return(0)))); 1 \\ Charles R Greathouse IV, Dec 09 2014
  • Python
    def exis(n):
        for x in range(1,n):
            for y in range(x+1):
                for z in range(y+1):
                    if x*y*z==(k-x)*(k-y)*(k-z):
                        return True
        return False
    for k in range(1, 200, 2):
        if not exis(k):
            print(str(k), end=',')
    

Extensions

Edited by Charles R Greathouse IV, Dec 09 2014