A338474 a(n) is the smallest number that can be partitioned into n ways as the sum of two brilliant numbers (A078972).
1, 8, 18, 338, 462, 542, 638, 660, 918, 858, 924, 1260, 1140, 1122, 1428, 1326, 1740, 1710, 2520, 2070, 1938, 3150, 3330, 27342, 27810, 29190, 30600, 35754, 32700, 31710, 35310, 32760, 35952, 35790, 35910, 39450, 40950, 41160, 39060, 45990, 40680, 42510, 44520
Offset: 0
Examples
8 = 4 + 4 = A078972(1) + A078972(1); 18 = 4 + 14 = A078972(1) + A078972(5) and 18 = 9 + 9 = A078972(3) + A078972(3). 18 = 15 + 323 = A078972(6) + A078972(22), 338 = 49 + 289 = A078972(10) + A078972(19) and 338 = 169 + 169 = A078972(13) + A078972(13).
Programs
-
Magma
f:=Factorisation; brnumber:=func
; v:=[m:m in [2..50000]|brnumber(m)]; a:=[]; for n in [0..32] do k:=1; while #RestrictedPartitions(k,2,Set(v)) ne n do k:=k+1; end while ; Append(~a,k); end for; a; -
Mathematica
m = 46000; brils = Select[Range[m], (f = FactorInteger[#])[[;; , 2]] == {2} || f[[;; , 2]] == {1, 1} && Equal @@ IntegerLength@f[[;; , 1]] &]; a[n_] := Length[IntegerPartitions[n, {2}, brils]]; mx = 43; s = Table[-1, {mx}]; c = 0; n = 1; While[c < mx, i = a[n] + 1; If[i <= mx && s[[i]] < 0, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Nov 03 2020 *)
Comments