|
|
A361289
|
|
For the odd numbers 2n + 1, the least practical number r such that 2n + 1 = r + p where p is prime.
|
|
1
|
|
|
1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 6, 2, 2, 4, 6, 2, 4, 2, 2, 4, 2, 4, 6, 2, 4, 6, 2, 2, 4, 6, 2, 4, 2, 2, 4, 6, 2, 4, 2, 4, 6, 2, 4, 6, 8, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 6, 8, 16, 12, 18, 2, 4, 2, 4, 6, 2, 2, 4, 6, 8, 12, 2, 2, 4, 6, 2, 4, 6, 2, 4, 2, 4, 6, 2, 4, 6, 2, 2, 4, 6, 8, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Conjecture by Hal M. Switkay: every odd number, beginning with 3, is the sum of a prime number and a practical number. Note that this conjecture occupies the space between the unproven Goldbach conjecture and the theorem that every even number, beginning with 2, is the sum of two practical numbers (Melfi's 1996 proof of Margenstern's conjecture).
|
|
LINKS
|
|
|
EXAMPLE
|
a(61) = 16, because the 61st odd number is 123 = {(10+113), (14+109), (16+107), ...} and 16 is the least practical number. 10 and 14 are not practical.
|
|
MATHEMATICA
|
PracticalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1 || (n>1 && OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e}=Transpose[f]; Do[If[p[[i]]>1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]];
part[n_, m_] := Module[{p=NextPrime[n, -m], d}, d=n-p; {d, p}];
find[n_] := Module[{m=1}, While[!PracticalQ[part[n, m][[1]]], m++]; part[n, m]];
Table[find[2 n + 1][[1]], {n, 1, 1000}]
|
|
PROG
|
(Python)
from sympy import factorint, prevprime
# Stale copy of code for is_A005153 deleted, please see there. Code duplication potentially creates important problems. - M. F. Hasler, Jun 19 2023
for odds in range(3, 192, 2):
prime = prevprime(odds)
while not is_A005153(odds - prime): prime = prevprime(prime)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|