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.

Showing 1-1 of 1 results.

A273130 Numbers which have only positive entries in the difference table of their divisors.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 33, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 79, 81, 83, 85, 87, 89, 93, 95, 97, 101, 103, 107, 109, 111, 113, 115, 119, 121, 123, 125, 127, 128, 129, 131, 133
Offset: 1

Views

Author

Peter Luschny, May 16 2016

Keywords

Comments

Primes and powers of primes are in the sequence.

Examples

			85 is in the sequence because the difference table of the divisors of 85 has only entries greater than 0:
[1, 5, 17, 85]
[4, 12, 68]
[8, 56]
[48]
		

Crossrefs

Cf. A014567, A187202, A273102, A273103, A273109, A273157 (complement).

Programs

  • Mathematica
    Select[Range@ 1000, {} == NestWhile[ Differences, Divisors @ #, # != {} && Min[#] > 0 &] &] (* Giovanni Resta, May 16 2016 *)
  • PARI
    has(v)=if(#v<2, v[1]>0, if(vecmin(v)<1, 0, has(vector(#v-1,i,v[i+1]-v[i]))))
    is(n)=has(divisors(n)) \\ Charles R Greathouse IV, May 16 2016
  • Sage
    def sf(z):
        D = divisors(z)
        T = matrix(ZZ, len(D))
        for m, d in enumerate(D):
            T[0, m] = d
            for k in range(m-1, -1, -1) :
                T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
                if T[m-k, k] <= 0: return False
        return True
    print([z for z in range(1,100) if sf(z)])
    
Showing 1-1 of 1 results.