|
|
A361301
|
|
For the odd number 2n + 1, the least primitive practical number r such that 2n + 1 = r + p where p is prime.
|
|
1
|
|
|
1, 2, 2, 2, 6, 2, 2, 6, 2, 2, 6, 2, 20, 6, 2, 2, 6, 6, 2, 28, 2, 2, 6, 2, 20, 6, 2, 20, 6, 2, 2, 6, 6, 2, 28, 2, 2, 6, 6, 2, 30, 2, 20, 6, 2, 20, 6, 30, 2, 28, 2, 2, 6, 2, 2, 6, 2, 20, 6, 20, 20, 28, 20, 2, 28, 2, 28, 6, 2, 2, 6, 6, 20, 42, 2, 2, 6, 6, 2, 30, 6, 2, 28, 2, 20, 6, 2, 20, 6, 2, 2, 6, 6, 88, 28
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Conjecture: every odd number, beginning with 3, is the sum of a prime number and a primitive practical number. This is a tighter conjecture than that posed by Hal M. Switkay (see comments of A005153).
|
|
LINKS
|
|
|
EXAMPLE
|
a(61) = 20, because 61st odd number is 123 = {(10+113), (14+109), (16+107), (20+103), ...} and 20 is the least primitive practical number. 10 and 14 are not practical numbers and 16 is practical but not primitive.
|
|
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]]];
DivFreeQ[n_] := Module[{plst=First/@Select[FactorInteger[n], #[[2]]>1 &], m, ok=False}, Do[If[! PracticalQ[n/plst[[m]]], ok=True, ok=False; Break[]], {m, 1, Length@plst}]; ok];
PPracticalQ[n_] := PracticalQ[n] && (SquareFreeQ[n] || DivFreeQ[n]);
part[n_, m_] := Module[{p = NextPrime[n, -m], d}, d = n - p; {d, p}];
find[n_] := Module[{m=1}, While[!PPracticalQ[part[n, m][[1]]], m++]; part[n, m]];
Table[find[2 n + 1][[1]], {n, 1, 1000}]
|
|
PROG
|
(Python)
from sympy import prevprime, factorint
def is_primitive(n):
for i in range(0, len(list(factorint(n)))):
if list(factorint(n).values())[i] > 1:
if is_A005153(n//list(factorint(n))[i]): return False
return True
if is_A005153(n) and is_primitive(n) : return True
for odds in range(3, 192, 2):
prime = prevprime(odds)
while not is_A267124(odds - prime): prime = prevprime(prime)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|