A081327 Smallest 3-smooth number m such that n-m is also 3-smooth, a(n)=0 if no such 3-smooth number exists.
0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 0, 6, 1, 2, 3, 1, 2, 3, 4, 8, 1, 2, 3, 4, 1, 2, 3, 4, 9, 6, 16, 8, 9, 0, 0, 12, 1, 2, 3, 4, 0, 6, 1, 2, 3, 4, 27, 6, 0, 8, 9, 16, 1, 2, 3, 4, 0, 6, 0, 8, 1, 2, 3, 4, 0, 6, 0, 8, 9, 1, 2, 3, 4, 32, 6, 16, 8, 9, 27, 0, 12, 0, 0, 24, 1, 2, 3, 4, 0
Offset: 1
Keywords
Examples
a(32) = 8 = 2^3, as 32 = 8 + 3*2^3.
Programs
-
Mathematica
smooth3Q[n_] := n/2^IntegerExponent[n, 2]/3^IntegerExponent[n, 3] == 1; a[n_] := Module[{m}, For[m = 1, m
Jean-François Alcover, Oct 14 2021 *)