login
a(n) is the smallest number that can be partitioned into n ways as the sum of two Moran numbers.
0

%I #11 Sep 08 2022 08:46:25

%S 0,36,63,174,198,306,312,399,1176,930,1296,1989,1110,888,2190,1896,

%T 2688,3990,3630,3090,3696,3810,8316,6870,4710,12420,11340,9180,13350,

%U 12990,14070,14364,14970,9900,15444,14790,15012,18570,19980,25164,23610,25092,23790

%N a(n) is the smallest number that can be partitioned into n ways as the sum of two Moran numbers.

%e 0 cannot be written as the sum of two Moran numbers because A001101(1) = 18, so 0 is a term and a(0) = 0.

%e 36 = 18 + 18 = A001101(1) + A001101(1), so a(1) = 36.

%e 63 = 18 + 27 = A001101(1) + A001101(5) and 63 = 21 + 42 = A001101(2) + A001101(4), so a(2) = 63.

%e 174 = 18 + 156 = 21 + 153 = 63 + 111 and 18, 21, 63, 111, 153, 156 are in A001101, so a(3) = 174.

%e 198 = 27 + 171 = 42 + 156 = 45 + 153 = 84 + 114 and 27, 42, 45, 84, 153, 156, 171 are in A001101, so a(4) = 198.

%t m = 60000; morans = Select[Range[m], PrimeQ[#/Plus @@ IntegerDigits[#]] &]; mx = 43; s = Table[-1, {mx}]; n = 0; c = 0; While[c < mx && n <= m, If[(i = Length[IntegerPartitions[n, {2}, morans]] + 1) <= mx && s[[i]] == -1, c++; s[[i]] = n]; n++]; s (* _Amiram Eldar_, Oct 21 2020 *)

%o (Magma) a:=[]; moran:=func<n|n mod &+Intseq(n) eq 0 and IsPrime( n div &+Intseq(n))>; v:={m:m in [1..40000]|moran(m)}; for n in [0..40] do k:=0; while #RestrictedPartitions(k,2,v) ne n do k:=k+1; end while; Append(~a,k); end for; a;

%Y Cf. A001101, A337854, A337861.

%K nonn,base

%O 0,2

%A _Marius A. Burtea_, Oct 21 2020