A055156 Powers of 3 which are not powers of 3^3.
3, 9, 81, 243, 2187, 6561, 59049, 177147, 1594323, 4782969, 43046721, 129140163, 1162261467, 3486784401, 31381059609, 94143178827, 847288609443, 2541865828329, 22876792454961, 68630377364883, 617673396283947
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 27).
Crossrefs
Programs
-
Mathematica
With[{nn=40},Complement[3^Range[nn],27^Range[Floor[nn/3]]]] (* or *) LinearRecurrence[{0,27},{3,9},40] (* Harvey P. Dale, Jul 17 2012 *)
Formula
a(n) = a(n-1)*a(n-2)/a(n-3) = 27*a(n-2) = 3^A001651(n).
a(2n) = 3^(3n+1), a(2n+1) = 3^(3n+2).