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.

Previous Showing 11-20 of 23 results. Next

A231814 Squarefree numbers (from A005117) with prime divisors in a 2p-1 progression.

Original entry on oeis.org

6, 15, 30, 91, 703, 1891, 2701, 12403, 18721, 38503, 49141, 51319, 79003, 88831, 104653, 146611, 188191, 218791, 226801, 269011, 286903, 385003, 497503, 597871, 665281, 721801, 736291, 765703, 873181, 954271, 1056331, 1314631, 1373653, 1537381, 1755001, 1869211
Offset: 1

Views

Author

Jaroslav Krizek, Nov 13 2013

Keywords

Comments

Squarefree numbers with k >= 2 prime factors of the form p_1 * p_2 * ... * p_k, where p_1 < p_2 < ... < p_k = primes with p_k = 2 * p_(k-1) - 1.
Each of these numbers is divisible by the arithmetic mean of its proper divisors.
Supersequence of A129521 (numbers of the form p*q, p and q prime with q=2*p-1; see A005382 and A005383).

Examples

			51319 = 19*37*73 where 37 = 2*19 - 1, 73 = 2*37 - 1.
		

Crossrefs

Cf. A057330 (first prime for such numbers that has n factors).

Programs

  • Maple
    N:= 10^7: # for terms <= N
    p:= 1: S:= NULL: count:= 0:
    do
      p:= nextprime(p);
      if p*(2*p-1) > N then break fi;
      q:= p; x:= p;
      do
        q:= 2*q-1;
        if not isprime(q) then break fi;
        x:= x*q;
        if x > N then break fi;
        S:= S,x; count:= count+1;
      od;
    od:
    sort([S]); # Robert Israel, Mar 24 2023
  • Mathematica
    geomQ[lst_] := Module[{x = lst - 1}, x = x/x[[1]]; Log[2, x] + 1 == Range[Length[x]]]; Select[Range[2, 1000000], ! PrimeQ[#] && SquareFreeQ[#] && geomQ[Transpose[FactorInteger[#]][[1]]] &] (* T. D. Noe, Nov 14 2013 *)

A259676 Heptagonal numbers (A000566) that are semiprimes (A001358).

Original entry on oeis.org

34, 55, 235, 403, 469, 697, 1177, 1651, 2059, 2839, 4141, 5221, 6943, 9211, 9517, 13213, 13579, 21949, 23377, 25351, 29539, 31753, 34633, 37027, 53071, 62173, 68641, 74563, 78943, 93799, 96727, 118483, 130759, 144841, 164737, 171217, 187279, 191407, 196981
Offset: 1

Views

Author

Colin Barker, Jul 03 2015

Keywords

Comments

For these semiprimes k*(5*k-3)/2, the corresponding k are listed in A114517.

Examples

			The heptagonal number 34 is in the sequence because 34 = 2 * 17.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [s: n in [2..300] | IsSemiprime(s) where s is n*(5*n-3) div 2]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    a={}; Do[If[PrimeOmega[n (5 n - 3) / 2]==2, AppendTo[a, n(5 n - 3) / 2]], {n, 1, 200}]; a (* Vincenzo Librandi, Jul 04 2015 *)
    Select[PolygonalNumber[7,Range[300]],PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 07 2021 *)
  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    select(n->bigomega(n)==2, vector(2000, n, pg(7, n)))
    

Formula

Equals A000566 intersect A001358.

A335267 Composite numbers whose harmonic mean of their divisors that are larger than 1 is an integer.

Original entry on oeis.org

6, 15, 28, 30, 91, 117, 135, 252, 270, 496, 703, 864, 936, 1891, 1989, 2295, 2701, 4284, 4590, 5733, 8128, 8432, 12403, 18721, 19872, 21528, 38503, 41580, 49141, 51319, 56896, 79003, 88831, 104653, 121920, 146611, 188191, 218791, 226801, 235053, 269011, 286903
Offset: 1

Views

Author

Amiram Eldar, May 29 2020

Keywords

Comments

The primes are excluded from this sequence since they are trivial terms.
The corresponding harmonic means are 3, 5, 5, 5, 13, 9, 9, 9, 9, 9, 37, ...
Equivalently, composite numbers m such that (sigma(m)-m) | m*(tau(m)-1), or A001065(m) | A168014(m).
The semiprimes terms of this sequence are of the form p*q where p and q = 2*p - 1 are primes (A129521).
If m is a k-perfect numbers, k = 2, 3, ... (i.e., sigma(m) = k*m), then sigma(m)-m = (k-1)*m. If (k-1)*m | m*(tau(m)-1) then (k-1) | (tau(m)-1). If k is odd then tau(m) is also odd, so m is a square, and sigma(m) is odd. Since m | sigma(m) this means that m is also odd. Since there is no known odd multiply-perfect number except for 1 (A007691), there are no known k-perfect numbers with odd k in this sequence.
The perfect numbers (k=2, A000396) are terms: if m is a perfect number then sigma(m)-m = m.
The 4-perfect number (k=4, A027687) m are terms if 3 | (tau(m)-1). Of the first 36 terms of A027687 there are 8 such terms, the first is A027687(26).
The 6-perfect number (k=6, A046061) m are terms if 5 | (tau(m)-1). Of the first 245 terms of A046061 there are 20 such terms, the first is A046061(19).
Hemiperfect numbers that are terms of this sequence include A055153(i) for i = 10, 18 and 20, A141645(21), and A159271(i) for i = 97 and 103.

Examples

			6 is a term since its divisors other than 1 are 2, 3 and 6, and their harmonic mean, 3/(1/2 + 1/3 + 1/6) = 3, is an integer.
		

Crossrefs

A000396 and A129521 are subsequences.
Similar sequences: A001599, A247077, A247078.
Cf. A000005 (tau), A000203 (sigma).

Programs

  • Mathematica
    Select[Range[10^6], CompositeQ[#] && Divisible[# * (DivisorSigma[0, #] - 1), DivisorSigma[1, #] - #] &]
    Select[Range[287000],CompositeQ[#]&&IntegerQ[HarmonicMean[ Rest[ Divisors[ #]]]]&] (* Harvey P. Dale, Jan 21 2021 *)

A338488 Numbers n whose symmetric representation of sigma(n) has a maximum width of 2 that occurs exactly once (at the diagonal).

Original entry on oeis.org

6, 15, 28, 91, 153, 190, 325, 496, 703, 861, 946, 1431, 1891, 2278, 2701, 3655, 4753, 5151, 5356, 5995, 6441, 7381, 8128, 8911, 9453, 10585, 11476, 12403, 13366, 15051, 18721, 21115, 22366, 23653
Offset: 1

Views

Author

Hartmut F. W. Hoft, Oct 30 2020

Keywords

Comments

For numbers n in the sequence the symmetric representation of sigma(n) consists of an odd number of regions. The geometric form for a single width 2 at the diagonal requires that
(a) the length of the last leg of the n-th Dyck path is A237591(n,row(n)) = 1 and the leg horizontal, which implies that row(n) is odd, and
(b) the length of the last leg of the (n-1)-st Dyck path is A237591(n-1,row(n-1)) = 2 and the leg vertical, which implies that row(n-1) = row(n) - 1 is even:
|_
| |_
|
Therefore, n is a hexagonal number (see A000384) and row(n) is an odd divisor of n since otherwise the central region of the symmetric representation for sigma(n) defined by the largest odd divisor d < row(n) would create an extent of width 2 larger than 1.
Since all other regions must have width 1 the following conditions characterize the numbers in this sequence:
Let 1 = d_1 < d_2 < ... < d_s <= row(n) < d_(s+1) < ... < d_t = q be all odd divisors of n = 2^k * q, k >= 0. n is hexagonal, 2^(k+1) * d_i < d_(i+1), for 1 <= i <= s-2, and d_s = row(n), so that 2^(k+1) * d_(s-1) = d_s + 1.
The numbers of this sequence can be arranged as a table according to the number of regions (one fewer than the number of its odd divisors) in the symmetric representation of sigma(n):
1 3 5 7 9 11
-------------------------------------------------
6 15 153 861 195625 43071
28 91 325 1431 ... ...
496 190 4753 3655 6859425628 50999950
8128 703 7381 5151 ... ...
... 946 ... 5995
1891 468028 6441
2278 ... 8911
2701 9453
5356 10585
11476 15051
12403 21115
13366 23653
18721 ...
22366 124750
... ...
The numbers less than 25000 in the first four columns were computed using function a338488[] while the numbers in the remaining two columns and the first even numbers in the 5-column and 7-column were computed by a function implementing the conditions on the structure of the odd divisors.
The 1-column consists of the even perfect numbers, A000396.
The 3-column is the sequence of numbers n =2^k * p * q, p & q odd primes, such that 2^(k+1) < p < q < 2^(k+1)*p = q+1. It is a subsequence of A338486, and includes the odd numbers in A129521 since (q+1)/2 = p is prime.
The odd numbers in the 5-column have 6 divisors and therefore form a subsequence in A116565.
Conjecture: For every odd number 2k-1 there is an even number n in this sequence whose symmetric representation of sigma(n) has 2k-1 regions.

Examples

			a(5) = 153 = 17*3^2 is in the sequence and in the 5-column of the table since 1 < 2 < 3 < 6 < 3^2 < 17 = row(153) < 2*3^2 representing the 6 odd divisors 1 - 153 - 3 - 51 - 9 - 17 (see A237048) results in the following pattern for the widths of its 17 legs (see A249223): 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2 for 5 regions with a single unit of width 2.
a(6) = 190 = 2*5*19 is in the sequence and in the 3-column of the table since 1 < 4 < 5 < 19 = row(190) < 4*5 representing the 4 odd divisors 1 - 190 - 5 - 19 results in the following pattern for the widths of its 19 legs: 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 for 3 regions with a single unit of width 2.
Number 66 = 2*3*11 is not in the sequence since positions 1 < 3 < 4 < 11 = row(66) < 4*3 representing the 4 odd divisors 1 - 3 - 33 - 11 violate the condition 4 = 4*d_1 < d_2 = 3; its symmetric representation of sigma consists of a single region in which the third leg and its symmetric copy have width 2 in addition to a single unit of width 2 at the diagonal.
		

Crossrefs

Programs

  • Mathematica
    (* function path[] and support functions are defined in A237270 *)
    a338488[m_, n_] := Module[{p0=path[m-1], p1, k, srs, w2, list={}}, For[k=m, k<=n, k++, p1=path[k]; srs=Map[#[[1]]-#[[2]]&, Transpose[{Drop[Drop[p1, 1], -1], p0}]]; w2=Length[Select[srs, #=={2, 2}&]]; If[Max[srs]==2&&w2==1, AppendTo[list, k]]; p0=p1]; list]
    a338488[1,25000] (* sequence data *)

A226754 Numbers of the form p*q, p and q prime with q=2*p+3.

Original entry on oeis.org

14, 65, 119, 377, 629, 779, 1769, 3827, 4559, 5777, 9179, 10877, 16109, 19109, 25877, 32639, 37949, 39059, 49769, 56279, 60377, 75077, 78209, 79799, 100127, 103739, 105569, 145529, 154289, 161027, 189419, 228149, 244649, 250277, 288419, 294527, 316409, 335789
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    fa = FactorInteger; t[n_]:=Length[fa[n]] == 2 && fa[n][[1,2]]== fa[n][[2, 2]] == 1 && 2 fa[n][[1, 1]]+3 == fa[n][[2, 1]];Select[1+Range[200000], t]
    Times@@#&/@Select[Table[{p,2p+3},{p,Prime[Range[200]]}],PrimeQ[#[[2]]]&] (* Harvey P. Dale, Jul 03 2021 *)
  • PARI
    list(lim)=my(v=List(),q); forprime(p=2,(sqrt(8*lim+9)-3)\4, if(isprime(q=2*p+3),listput(v,p*q))); Vec(v) \\ Charles R Greathouse IV, Nov 19 2013

A252044 Numbers n such that s + 1/p = 0, where {d(i), i=1..q} are the q distinct prime divisors of n, s = Sum_{i=1..q} (-1)^(i+1)*i/d(i) and p = Product_{i=1..q} d(i).

Original entry on oeis.org

6, 12, 15, 18, 24, 36, 45, 48, 54, 72, 75, 91, 96, 108, 114, 135, 144, 162, 192, 216, 225, 228, 288, 324, 342, 375, 384, 405, 432, 456, 486, 576, 637, 648, 675, 684, 703, 768, 864, 912, 972, 1026, 1125, 1152, 1183, 1215, 1296, 1368, 1458, 1536, 1728, 1824, 1875
Offset: 1

Views

Author

Michel Lagneau, Dec 13 2014

Keywords

Comments

The semiprimes p*q, p and q prime with q=2*p-1 (A129521) are in the sequence.

Examples

			18 is in the sequence because the prime factors of 18 are {2,3} => s = 1/2 - 2/3, 1/p = 1/6 and 1/2 - 2/3 + 1/6 = -1/6 + 1/6 = 0.
114 is in the sequence because the prime factors of 114 are {2,3,19} => s = 1/2 - 2/3 + 3/19, 1/p = 1/114 and 1/2 - 2/3 + 3/19 + 1/114 = -1/114 + 1/114 = 0.
		

Crossrefs

Cf. A129521, A007947 (product of the distinct prime factors of n).

Programs

  • Maple
    with(numtheory):nn:=10000:
    for n from 1 to nn do:
       x:=factorset(n):n0:=nops(x):
       s:=sum('i*((-1)^(i+1))/x[i]','i'=1..n0):s0:=product('x[i]','i'=1..n0):
       p:=product('x[i]','i'=1..n0):s2:=s+1/s0:
        if s2=0
        then
        printf(`%d, `,n):
        else
        fi:
      od:
  • Mathematica
    fQ[n_] := Block[{pd = First@# & /@ FactorInteger@ n, rng}, rng = Range@ Length@ pd; 1 == (Times @@ pd)*Total[rng/pd*((-1)^rng)]]; Select[ Range@ 2000, fQ@# &] (* Robert G. Wilson v, Jan 11 2015 *)
  • PARI
    isok(n) = {my(vp = factor(n)[,1]~); 1/prod(i=1, #vp, vp[i]) + sum(i=1, #vp, (-1)^(i+1)*i/vp[i]) == 0;} \\ Michel Marcus, Jan 12 2015

A338486 Numbers n whose symmetric representation of sigma(n) consists of 3 regions with maximum width 2.

Original entry on oeis.org

15, 35, 45, 70, 77, 91, 110, 130, 135, 143, 154, 170, 182, 187, 190, 209, 221, 225, 238, 247, 266, 286, 299, 322, 323, 350, 374, 391, 405, 418, 437, 442, 493, 494, 506, 527, 550, 551, 572, 589, 598, 638, 646, 650, 667, 682, 703, 713, 748, 754, 782, 806, 814, 836, 850
Offset: 1

Views

Author

Hartmut F. W. Hoft, Oct 30 2020

Keywords

Comments

This sequence is a subsequence of A279102. The definition of the sequence excludes squares of primes, A001248, since the 3 regions of their symmetric representation of sigma have width 1 (first column in the irregular triangle of A247687).
Table of numbers in this sequence arranged by the number of prime factors, counting multiplicities:
2 3 4 5 6 7 ...
------------------------------------------
15 45 135 405 1215 3645
35 70 225 1125 5625 ...
77 110 350 1750 8750 744795
91 130 550 2584 ... ...
143 154 572 2750 85455
187 170 650 3128 ...
209 182 748 3250
221 190 836 3496
247 238 850 3944
299 266 884 4216
... ... ... ...
1035 9585
... ...
The numbers in the first row of the table above are b(k) = 5*3^k, k>=1, (see A005030) so that infinitely many odd numbers occur outside of the first column. The central region of the symmetric representation of sigma(b(k)) contains 2*k-1 separate contiguous sections consisting of sequences of entire legs of width 2, k>=1 (see Lemma 2 in the link).
Conjecture: The combined extent of these sections in sigma(b(k)) is 2*3^(k-1) - 1 = A048473(k-1), k>=1.
Since each number n in the first column and first row has a prime factor of odd exponent a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 2. For odd numbers n not in the first row or column in which all prime factors have even powers, such as 225 and 5625 in the second row, a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 1 (see Lemma 1 in the link).
For each k>=3 and every prime p such that b(k-1) < 2*p < 4*b(k-2), the odd number p*b(k-1) is in the column of b(k). The two inequalities are equivalent to b(k-1) <= row(p*b(k-1)) < 2*b(k-1) ensuring that the symmetric representation of sigma(p*b(k-1)) consists of 3 regions.
45 is the only odd number in its column (see Lemma 3 in the link).
Since the factors of n = p*q satisfy 2 < p < q < 2*p the first column in the table above is a subsequence of A082663 and of A087718 (see Lemma 4 in the link). Each of the two outer regions consists of a single leg of width 1 and length (1 + p*q)/2. The center region of size p+q consists of two subparts (see A196020 & A280851) of width 1 of sizes 2*p-q and 2*q-p, respectively (see Lemma 5 in the link). The table below arranges the first column in the table above according to the length 2*p-q of their single contiguous extent of width 2 in the center region:
1 3 5 7 9 11 13 15 ...
------------------------------------------------------
15 35 187 247 143 391 2257 323
91 77 493 589 221 1363 3139 437
703 209 943 2479 551 2911 6649 713
1891 299 1537 3397 851 3901 ... 1247
2701 527 4183 8509 1643 6313 1457
... ... ... ... ... ... ....
A129521: p*q satisfies 2*p - q = 1 (excluding A129521(1)=6)
A226755: p*q satisfies 2*p - q = 3 (excluding A226755(1)=9)
Sequences with larger differences 2*p - q are not in OEIS.

Examples

			a(6) = 91 = 7*13 is in the sequence and in the 2-column of the first table since 1 < 2 < 7 < 13 = row(91) representing the 4 odd divisors 1 - 91 - 7 - 13 (see A237048) results in the following pattern for the widths of the legs (see A249223): 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2. It also is in the 1-column of the second table since it has a single area of width 2 which is 1 unit long.
a(29) = 405 = 5*3^4 is in the sequence and in the 5-column of the first table since 1 < 2 < 3 < 5 < 6 < 9 < 10 < 15 < 18 < 27 = row(405) representing the 10 odd divisors 1 - 405 - 3 - 5 - 135 - 9 - 81 - 15 - 45 - 27 results in the following pattern for the widths of the legs: 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2, and 7 = 2*4 - 1 sections of width 2 in the central region.
a(35) = 506 = 2*11*23 is in the sequence since positions 1 < 4 < 11 < 23 < row(506) = 31 representing the 4 odd divisors 1 - 253 - 11 - 23 results in the following pattern for the widths of the legs: 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 for 3 regions with width not exceeding 2, with the two outer regions consisting of 3 legs of width 1, and a single area of width 2 in the central region.
		

Crossrefs

Programs

  • Mathematica
    (* Functions path and a237270 are defined in A237270 *)
    maxDiagonalLength[n_] := Max[Map[#[[1]]-#[[2]]&, Transpose[{Drop[Drop[path[n], 1], -1], path[n-1]}]]]
    a338486[m_, n_] := Module[{r, list={}, k}, For[k=m, k<=n, k++, r=a237270[k]; If[Length[r]== 3 && maxDiagonalLength[k]==2,AppendTo[list, k]]]; list]
    a338486[1, 850]

A349497 a(n) is the smallest element in the continued fraction of the harmonic mean of the divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Nov 20 2021

Keywords

Examples

			a(2) = 1 since the continued fraction of the harmonic mean of the divisors of 2, 4/3 = 1 + 1/3, has 2 elements, {1, 3}, and the smallest of them is 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Min[ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]]; Array[a, 100]

Formula

a(p) = 1 for a prime p.
a(p^2) = 1 for a prime p != 3.
a(A129521(n)) = 1 for n > 3.
For a harmonic number m = A001599(k), a(m) = A099377(m) = A001600(k).

A380007 Hexagonal numbers that are sphenic numbers.

Original entry on oeis.org

66, 190, 231, 435, 561, 861, 946, 1653, 2278, 3655, 4371, 5151, 5995, 6441, 8911, 9453, 10011, 10585, 13366, 15051, 15753, 16471, 20301, 21115, 22366, 22791, 23653, 26335, 32131, 33153, 39621, 40186, 45451, 50403, 54946, 62481, 69751, 72771, 77421, 80601, 83845, 93961, 99235, 102831
Offset: 1

Views

Author

Massimo Kofler, Jan 08 2025

Keywords

Examples

			66 = 2*3*11 is the product of 3 distinct primes and the 6th hexagonal number hex(6) = 6*(2*6-1).
231 = 3*7*11 is the product of 3 distinct primes and the 11th hexagonal number hex(11) = 11*(2*11-1).
		

Crossrefs

Intersection of A000384 and A007304.
Cf. A129521.

Programs

  • Mathematica
    semiQ[k_] := FactorInteger[k][[;; , 2]] == {1, 1}; q[k_] := (PrimeQ[k] && semiQ[2*k - 1]) || (PrimeQ[2*k - 1] && semiQ[k]); Table[k*(2*k - 1), {k, Select[Range[250], q]}] (* Amiram Eldar, Jan 08 2025 *)

A212308 Numbers with no proper divisor that is not in an arithmetic progression of at least three proper divisors.

Original entry on oeis.org

1, 6, 12, 15, 18, 24, 30, 36, 45, 48, 54, 60, 66, 72, 75, 84, 90, 91, 96, 108, 120, 132, 135, 144, 150, 162, 168, 180, 192, 198, 216, 225, 240, 252, 264, 270, 276, 288, 300, 306, 312, 324, 330, 336, 360, 375, 384, 396, 405, 420, 432, 435, 450, 480, 486, 504
Offset: 1

Views

Author

William Rex Marshall, Oct 24 2013

Keywords

Comments

Equivalently, the numbers with exactly one divisor that is not in an arithmetic progression of at least three divisors.
Contains p^j*(2*p-1)^k for j,k>=1 if p and 2*p-1 are primes. - Robert Israel, Apr 13 2020

Examples

			36 appears in this sequence because its proper divisors are 1, 2, 3, 4, 6, 9, 12 and 18, each of which appears in at least one of the following arithmetic progressions of at least three proper divisors of 36: {1, 2, 3, 4}, {3, 6, 9, 12}, {6, 12, 18}.
		

Crossrefs

Contains A033845, A129521.

Programs

  • Maple
    filter:= proc(n) local S,D,tau,a,b;
      S:= numtheory:-divisors(n) minus {n};
      D:= sort(convert(S,list));
      tau:= nops(D);
      for a from 1 to tau-2 do for b from a+1 to tau-1 do
        if member(2*D[b]-D[a],D) then
          S:= S minus {D[a],D[b],2*D[b]-D[a]};
          if S = {} then return true fi;
        fi
      od od;
      false;
    end proc:
    filter(1):= true:
    select(filter, [$1..1000]); # Robert Israel, Apr 13 2020
  • Mathematica
    filterQ[n_] := Module[{S, D, tau, a, b}, S = Most @ Divisors[n]; D = S; tau = Length[D]; For[a = 1, a <= tau - 2, a++, For[b = a + 1, b <= tau - 1, b++, If [MemberQ[D, 2 D[[b]] - D[[a]]], S = S ~Complement~ {D[[a]], D[[b]], 2 D[[b]] - D[[a]]}; If[S == {}, Return[True]]]]]; False];
    filterQ[1] = True;
    Select[Range[1000], filterQ] (* Jean-François Alcover, Sep 26 2020, after Robert Israel *)
Previous Showing 11-20 of 23 results. Next