OFFSET
1,1
COMMENTS
The neighbors of n are the two numbers n-1 and n+1.
LINKS
Jonathan Frech, Table of n, a(n) for n = 1..10000
EXAMPLE
71 is in the sequence since 70 = 2*5*7 < 71 < 2*2*2*3*3 = 72 with 2 + 5 + 3 + 3 = 7 + 2 + 2 + 2.
MATHEMATICA
ok[n_] := Block[{t, p, m, z}, {p, m} = Transpose@ Tally@ Sort[ Join@ Flatten[ ConstantArray @@@ FactorInteger[#] & /@ {n-1, n+1}]]; t = Total[p m]; If[ OddQ@ t, False, z = Quiet@ LinearProgramming[1 + 0 p, {p}, {{t/2, 0}}, Prepend[#, 0] & /@ Transpose@{m}, Integers]; ListQ@z && Total[z p]==t/2]]; Select[ Range[3, 815], ok] (* Giovanni Resta, Sep 10 2019 *)
PROG
(Haskell)
import Data.List (subsequences, (\\))
factors 1 = []
factors n | p <- head $ filter ((== 0) . mod n) [2..]
= p : factors (n `div` p)
sumPartitionable ns | p <- \ms -> sum ms == sum (ns \\ ms)
= any p $ subsequences ns
a325902 = filter (\n -> sumPartitionable $ factors (n-1) ++ factors (n+1)) [2..]
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Frech, Sep 07 2019
STATUS
approved