cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A081328 Greatest 3-smooth number m such that n-m is also 3-smooth, a(n)=0 if no such 3-smooth number exists.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 19 2003

Keywords

Examples

			a(32) = 24 = 3*2^3, as 32 = 2^3 + 24.
		

Crossrefs

Programs

  • 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 *)

Formula

a(n)=0 iff A081326(n)=0; if a(n)>0: a(n)+A081327(n)=n.