OFFSET
0,2
COMMENTS
From Paul Barry, May 27 2005: (Start)
Generalized NSW numbers.
Counts total area under elevated Schroeder paths of length 2n+2, where area under a horizontal step is weighted 3. Case r=4 for family (1+(r-1)x)/(1-2(1+r)x+(1-r)^2*x^2). Case r=2 gives NSW numbers A002315. Fifth binomial transform of (1+8x)/(1-16x^2), A107906. (End)
Primes in this sequence include: a(2) = 13, a(4) = 1093, a(7) = 797161. Semiprimes in this sequence include: a(3) = 121 = 11^2, a(5) = 9841 = 13 * 757, a(6) = 88573 = 23 * 3851, a(9) = 64570081 = 1871 * 34511, a(10) = 581130733 = 1597 * 363889, a(12) = 47071589413 = 47 * 1001523179, a(19) = 225141952945498681 = 13097927 * 17189128703.
Sum of divisors of 9^n. - Altug Alkan, Nov 10 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (10,-9).
FORMULA
From Paul Barry, May 27 2005: (Start)
G.f.: (1+3*x)/(1-10*x+9*x^2).
a(n) = Sum_{k=0..n} binomial(2*n+1,2*k)*4^k.
a(n) = ((1+sqrt(4))*(5+2*sqrt(4))^n+(1-sqrt(4))*(5-2*sqrt(4))^n)/2. (End)
a(n-1) = (-9^n/3)*B(2*n,1/3)/B(2*n) where B(n,x) is the n-th Bernoulli polynomial and B(k)=B(k,0) is the k-th Bernoulli number.
a(n) = 10*a(n-1) - 9*a(n-2).
a(n) = 9*a(n-1) + 4. - Vincenzo Librandi, Nov 01 2011
a(n) = A320030(3^n-1). - Nathan M Epstein, Jan 02 2019
From Elmo R. Oliveira, Nov 16 2025: (Start)
E.g.f.: exp(x)*(3*exp(8*x) - 1)/2.
a(n) = A198960(n)/2. (End)
MATHEMATICA
Table[(3*9^n - 1)/2, {n, 0, 18}] (* L. Edson Jeffery, Feb 13 2015 *)
LinearRecurrence[{10, -9}, {1, 13}, 30] (* Harvey P. Dale, Feb 07 2026 *)
PROG
(Magma) [(3*9^n-1)/2: n in [0..20]]; // Vincenzo Librandi, Nov 01 2011
(PARI) a(n)=(3*9^n-1)/2 \\ Charles R Greathouse IV, Sep 28 2015
(PARI) vector(30, n, n--; sigma(9^n)) \\ Altug Alkan, Nov 10 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jun 18 2004
EXTENSIONS
Edited by N. J. A. Sloane, at the suggestion of Andrew S. Plewe, Jun 15 2007
STATUS
approved
