|
|
A336297
|
|
Prime numbers p such that equation x = p*sopf(x) (where sopf(x) is the sum of distinct prime factors of x) has exactly 1 solution in positive integers.
(history;
published version)
|
|
|
#21 by Alois P. Heinz at Thu Jul 23 14:10:03 EDT 2020
|
|
|
|
#20 by Wesley Ivan Hurt at Thu Jul 23 13:52:25 EDT 2020
|
|
|
|
#19 by Michel Marcus at Thu Jul 23 10:42:45 EDT 2020
|
|
|
|
#18 by Michel Marcus at Thu Jul 23 10:42:04 EDT 2020
|
| PROG
|
(PARI) sopf(n) = vecsum(factor(n)[, 1]); \\ A008472
pp(n) = prod(k=1, n, prime(k)); \\ A002110
sp(n) = sum(k=1, n, prime(k)); \\ A007504
ip(n) = {my(k=1); while (pp(k)/sp(k) <= n, k++); k+1; }
lista(nn) = {my(lim = pp(ip(nn))); my(v = vector(lim, k, k++; k/sopf(k))); my(w = select(x->myisprime(x), v)); select(x->(x<=nn), apply(x->prime(x), Vec(select(x->(x==1), vector(nn-1, k, #select(x->(x==prime(k)), w)), 1)))); } \\ Michel Marcus, Jul 19 2020
|
| STATUS
|
approved
editing
|
|
|
Discussion
|
Thu Jul 23
| 10:42
| Michel Marcus: the limit is problematic; better to remove it
|
|
|
|
#17 by Peter Luschny at Wed Jul 22 05:38:53 EDT 2020
|
|
|
|
#16 by Michel Marcus at Tue Jul 21 10:43:43 EDT 2020
|
|
|
Discussion
|
Tue Jul 21
| 11:30
| Michel Marcus: maybe my upper bound is too pessimistic
|
|
|
|
#15 by Michel Marcus at Tue Jul 21 05:31:51 EDT 2020
|
|
|
Discussion
|
Tue Jul 21
| 09:48
| Peter Luschny: Vladimir, the only time I see your algorithm fail for primes less than 1000 is at p=53; so you can easily exclude this case. And you can make the program much more efficient by returning a "non-unique-solution" already when a second solution is found. Instead of gathering all solutions before you inspect their number.
|
| 10:22
| Vladimir Letsko: It is the program for A336297.
Michel's question is the only reason I've placed it here :-)
|
|
|
|
#14 by Michel Marcus at Tue Jul 21 05:31:29 EDT 2020
|
| PROG
|
lista(nn) = {my(lim = pp(ip(nn))); my(v = vector(lim, k, k++; k/sopf(k))); my(w = select(x->myisprime(x), v)); select(x->(x<=nn), apply(x->prime(x), Vec(select(x->(x==1), vector(nn) = {} \\ _-1, k, #select(x->(x==prime(k)), w)), 1)))); } \\ _Michel Marcus_, Jul 19 2020
|
|
|
Discussion
|
Tue Jul 21
| 05:31
| Michel Marcus: script is quicker
|
|
|
|
#13 by Michel Marcus at Tue Jul 21 05:30:52 EDT 2020
|
| PROG
|
lista(nn) = {my(lim = pp(ip(nn))); my(v = vector(lim, k, k++; k/sopf(k))); my(w = vector(nn-1, k, #select(x->(x==k+1), v))); select(x->isprime(x), apply(x->x+1, Vec(select(x->(x==1), w, 1)))); } \\ Michel Marcus, Jul 19 2020
lista(nn) = {} \\ Michel Marcus, Jul 19 2020
|
| STATUS
|
reviewed
editing
|
|
|
|
#12 by Michel Marcus at Mon Jul 20 13:19:24 EDT 2020
|
|
|
|