[go: up one dir, main page]

login
A081328
Greatest 3-smooth number m such that n-m is also 3-smooth, a(n)=0 if no such 3-smooth number exists.
4
0, 1, 2, 3, 4, 4, 6, 6, 8, 9, 9, 9, 12, 12, 12, 12, 16, 16, 18, 18, 18, 18, 0, 18, 24, 24, 24, 27, 27, 27, 27, 24, 32, 32, 32, 32, 36, 36, 36, 36, 32, 36, 27, 36, 36, 0, 0, 36, 48, 48, 48, 48, 0, 48, 54, 54, 54, 54, 32, 54, 0, 54, 54, 48, 64, 64, 64, 64, 0, 64, 0, 64, 72, 72, 72, 72, 0
OFFSET
1,3
FORMULA
a(n)=0 iff A081326(n)=0; if a(n)>0: a(n)+A081327(n)=n.
EXAMPLE
a(32) = 24 = 3*2^3, as 32 = 2^3 + 24.
MATHEMATICA
smooth3Q[n_] := n == 2^IntegerExponent[n, 2]*3^IntegerExponent[n, 3];
a[n_] := Module[{m}, For[m = n, m >= 1, m--, If[smooth3Q[m], If[smooth3Q[n - m], Return[m]]]]; 0];
Array[a, 77] (* Jean-François Alcover, Oct 17 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 19 2003
STATUS
approved