OFFSET
1,3
COMMENTS
Also equal to floor((3^n+1)/(3n-1)). [Proof: 3^n (mod 3n-1) is never zero; therefore 3^n -(3^n (mod 3n-1)) equals (1+3^n)-((1+3^n) mod (3n-1)), and removing the remainders in the numerator of either 1+3^n or 3^n results in the same number. The proof that 3^n <> 0 (mod 3n-1) follows from assuming that 3^n=k*(3n-1) for some integer k; reading this requirement mod 3 induces k=3*k', so 3^n=3*k'*(3n-1); reading this mod 9 induces k'=3*k'' etc. ad infinitum through all powers of 3, and forcing k->infinity.] - R. J. Mathar, Jun 20 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..600
MATHEMATICA
f[n_] := Floor[(3^n)/(3 n - 1)]
Table[f[n], {n, 1, 40}] (* A191627 *)
PROG
(PARI) a(n)=3^n\(3*n-1) \\ Charles R Greathouse IV, Jun 17 2011
(Maxima) A191627(n):=floor( 3^n/(3*n-1) )$ makelist(A191627(n), n, 1, 30); /* Martin Ettl, Oct 25 2012 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 09 2011
STATUS
approved