OFFSET
0,3
COMMENTS
Partial sums are in A014901. Also, the sequence is related to A014935 by A014935(n) = n*a(n) - Sum_{i=0..n-1} a(i), for n>0. - Bruno Berselli, Nov 06 2012
From Bernard Schott, May 06 2017: (Start)
Except for 0, 1 and 19, all terms are Brazilian repunits numbers in base 18, and so belong to A125134. From n = 3 to n = 8286, all terms are composite. See link "Generalized repunit primes".
As explained in the extensions of A128164, a(25667) = (18^25667 - 1)/17 would be (is) the smallest prime in base 18. (End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..800
Harvey Dubner, Generalized repunit primes, Math. Comp., 61 (1993), 927-930.
Index entries for linear recurrences with constant coefficients, signature (19,-18).
FORMULA
a(n) = floor(18^n/17).
G.f.: x/((1-x)*(1-18*x)). - Bruno Berselli, Nov 06 2012
a(n) = 19*a(n-1) - 18*a(n-2). - Vincenzo Librandi, Nov 07 2012
E.g.f.: exp(x)*(exp(17*x) - 1)/17. - Stefano Spezia, Mar 11 2023
EXAMPLE
a(3) = (18^3 - 1)/17 = 343 = 7 * 49; a(6) = (18^6 - 1)/17 = 2000719 = 931 * 2149. - Bernard Schott, May 01 2017
MATHEMATICA
LinearRecurrence[{19, -18}, {0, 1}, 40] (* Vincenzo Librandi, Nov 07 2012 *)
Join[{0}, Accumulate[18^Range[0, 20]]] (* Harvey P. Dale, Nov 08 2012 *)
PROG
(PARI) A218721(n)=18^n\17
(Magma) [n le 2 select n-1 else 19*Self(n-1)-18*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Nov 07 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 04 2012
STATUS
approved