OFFSET
0,2
COMMENTS
Also the 120ยบ spoke (or ray) of a hexagonal spiral of Ulam. - Robert G. Wilson v, Jul 06 2014
If two independent real random variables x and y are distributed according to the same exponential distribution with pdf(x) = lambda * exp(-lambda * x) for some lambda > 0, then the probability that 3 <= x/(n*y) < 4 is given by n/a(n) for n>1. - Andres Cicuttin, Dec 11 2016
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Colin Barker, Dec 12 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2.
G.f.: (1 + 17*x + 6*x^2)/(1-x)^3. (End)
E.g.f.: (1 + 19*x + 12*x^2)*exp(x). - G. C. Greubel, Oct 12 2019
EXAMPLE
See A056105 example section for hexagonal spiral of Ulam diagram. - Robert G. Wilson v, Jul 06 2014
MAPLE
MATHEMATICA
f[n_] := (3n + 1)(4n + 1); Array[f, 50, 0] (* Robert G. Wilson v, Jul 06 2014 *)
LinearRecurrence[{3, -3, 1}, {1, 20, 63}, 50] (* Harvey P. Dale, Jul 16 2020 *)
PROG
(PARI) vector(50, m, 12*m^2 - 17*m + 6) \\ Michel Marcus, Jul 06 2014
(PARI) Vec((1 + 17*x + 6*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Dec 12 2016
(Magma) [(3*n+1)*(4*n+1) : n in [0..50]]; // Wesley Ivan Hurt, Jul 06 2014
(Sage) [(3*n+1)*(4*n+1) for n in range(50)] # G. C. Greubel, Oct 12 2019
(GAP) List([0..50], n-> (3*n+1)*(4*n+1)); # G. C. Greubel, Oct 12 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, Jul 06 2014
STATUS
approved