[go: up one dir, main page]

login
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
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
A361289 = []
for odds in range(3, 192, 2):
prime = prevprime(odds)
while not is_A005153(odds - prime): prime = prevprime(prime)
A361289.append(odds - prime)
print(A361289) # Karl-Heinz Hofmann, Mar 08 2023
CROSSREFS
Cf. A005153.
Sequence in context: A160691 A367626 A049716 * A188903 A366534 A066671
KEYWORD
nonn
AUTHOR
Frank M Jackson, Mar 07 2023
STATUS
approved