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-4 of 4 results.

A273157 Numbers which have nonpositive entries in the difference table of their divisors (complement of A273130).

Original entry on oeis.org

6, 10, 12, 14, 15, 18, 20, 22, 24, 26, 28, 30, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 52, 54, 56, 58, 60, 62, 63, 66, 68, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 86, 88, 90, 91, 92, 94, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 116, 117
Offset: 1

Views

Author

Peter Luschny, May 16 2016

Keywords

Comments

Primorial numbers (A002110) greater than 2 are in this sequence.

Examples

			30 is in this sequence because the difference table of the divisors of 30 is:
[1, 2, 3, 5, 6, 10, 15, 30]
[1, 1, 2, 1, 4, 5, 15]
[0, 1, -1, 3, 1, 10]
[1, -2, 4, -2, 9]
[-3, 6, -6, 11]
[9, -12, 17]
[-21, 29]
[50]
		

Crossrefs

Cf. A069059, A187202, A273102, A273103, A273109, A273130 (complement).

Programs

  • Sage
    def nsf(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 True
        return False
    print([n for n in range(1, 100) if nsf(n)])

A273200 Prime power-like integers.

Original entry on oeis.org

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, 53, 59, 61, 64, 65, 67, 71, 73, 79, 81, 83, 85, 89, 95, 97, 101, 103, 107, 109, 113, 115, 121, 125, 127, 128, 131, 133, 137, 139, 145, 149, 151, 155, 157, 161, 163, 167, 169
Offset: 1

Views

Author

Peter Luschny, May 17 2016

Keywords

Comments

Let DTD(n) denote the difference table of the divisors of n. The DTDs of prime powers (in the sense of A246655) have only positive entries and the rows and columns of their DTD are nondecreasing.
We define an integer n>0 and not the unity to be prime power-like if and only if DTD(n) has only positive entries and nondecreasing rows and columns (read from left to right and from top to bottom).
This sequence lists the prime power-like integers and sequence A273201 lists the integers which are prime power-like but not prime powers. Thus we have the inclusions A000040 < A246655 < A273200 and the union A273200 = A273201 U A246655.
Integers which have a positive but not monotone DTD are listed in A273199. Integers with a positive DTD are listed in A273130.

Examples

			125 is in this sequence because it is a prime power and has the DTD:
[  1    5    25  125]
[  4   20   100]
[ 16   80]
[ 64]
161 is in this sequence because the DTD of 161 has only positive entries and nondecreasing rows and columns:
[   1    7   23  161]
[   6   16  138]
[  10  122]
[ 112]
		

Crossrefs

Programs

  • Mathematica
    pplikeQ[n_] := Module[{T, DTD, DTD2}, If[n == 1, Return[False]]; T = Divisors[n]; DTD = Table[Differences[T, k], {k, 0, Length[T] - 1}]; If[AnyTrue[Flatten[DTD], NonPositive], Return[False]]; DTD2 = Transpose[PadRight[#, Length[T], Infinity]& /@ DTD]; AllTrue[DTD, OrderedQ] && AllTrue[DTD2, OrderedQ]];
    Select[Range[200], pplikeQ] (* Jean-François Alcover, Jun 28 2019 *)
  • Sage
    def is_prime_power_like(n):
        if n == 1: return False
        D = divisors(n)
        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
        non_decreasing = lambda L: all(x<=y for x, y in zip(L, L[1:]))
        b = True
        for k in range(len(D)-1):
            b &= non_decreasing(T.row(k)[:len(D)-k])
            b &= non_decreasing(T.column(k)[:len(D)-k])
            if not b: return False
        return b
    [n for n in range(1, 170) if is_prime_power_like(n)]

A273201 Integers which are prime power-like but not prime powers.

Original entry on oeis.org

21, 33, 39, 65, 85, 95, 115, 133, 145, 155, 161, 185, 203, 205, 215, 217, 235, 259, 261, 265, 279, 287, 295, 301, 305, 329, 335, 341, 355, 365, 371, 395, 407, 413, 415, 427, 445, 451, 469, 473, 481, 485, 497
Offset: 1

Views

Author

Peter Luschny, May 17 2016

Keywords

Comments

For an integer n>0 and not the unity we define DTD(n) to be the difference table of the divisors of n. We say that DTD(n) is positive if all entries in the table are positive and we call DTD(n) monotone if all rows and all columns of the table are nondecreasing (reading from left to right and from top to bottom).
We define an integer n to be prime power-like if and only if DTD(n) is positive and monotone. All prime powers (in the sense of A246655 (but not in the sense of A000961)) are prime power-like integers. Sequence A273200 provides the prime power-like integers. This sequence (A273201) lists the integers which are prime power-like but not prime powers.
Thus we have the inclusions A000040 < A246655 < A273200 and the union A273200 = A273201 U A246655. Integers which have a positive but not monotone DTD are listed in A273199. Integers with a positive DTD are listed in A273130.

Examples

			95 is in this sequence because the DTD of 95 has positive entries and nondecreasing rows and columns:
[ 1   5  19  95]
[ 4  14  76]
[10  62]
[52]
		

Crossrefs

Programs

  • Mathematica
    pplikeQ[n_] := Module[{T, DTD, DTD2}, If[n == 1 || PrimePowerQ[n], Return[False]]; T = Divisors[n]; DTD = Table[Differences[T, k], {k, 0, Length[T]-1}]; If[AnyTrue[Flatten[DTD], NonPositive], Return[False]]; DTD2 = Transpose[PadRight[#, Length[T], Infinity]& /@ DTD]; AllTrue[DTD, OrderedQ] && AllTrue[DTD2, OrderedQ]];
    Select[Range[500], pplikeQ] (* Jean-François Alcover, Jun 28 2019 *)
  • Sage
    # uses[is_prime_power_like from A273200]
    # Compare script in A273200.
    def is_A273201(n):
        return not is_prime_power(n) and is_prime_power_like(n)
    print(list(filter(is_A273201, range(1, 500))))

A273199 Integers which have a positive but not monotone difference table of their divisors.

Original entry on oeis.org

51, 55, 57, 69, 87, 93, 111, 119, 123, 129, 141, 159, 177, 183, 201, 207, 213, 219, 237, 249, 253, 267, 275, 291, 303, 309, 319, 321, 327, 333, 339, 369, 377, 381, 393, 403, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597
Offset: 1

Views

Author

Peter Luschny, May 17 2016

Keywords

Comments

For an integer n>0 and not the unity we define DTD(n) to be the difference table of the divisors of n. We say that DTD(n) is positive if all entries in the table are positive and we call DTD(n) monotone if all rows and all columns of the table are nondecreasing (reading from left to right and from top to bottom).

Examples

			159 is in this sequence because the DTD of 159 has only positive entries but not all columns are nondecreasing:
[  1   3   53 159]
[  2  50  106]
[ 48  56]
[  8]
		

Crossrefs

Programs

  • Sage
    def is_A273199(n):
        D = divisors(n)
        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
        non_decreasing = lambda L: all(x<=y for x, y in zip(L, L[1:]))
        b = True
        for k in range(0,len(D)-1):
            b &= non_decreasing(T.row(k)[:len(D)-k])
            b &= non_decreasing(T.column(k)[:len(D)-k])
            if not b: return True
        return False
    print([n for n in range(1,600) if is_A273199(n)])
Showing 1-4 of 4 results.