login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A244472
2nd-largest term in n-th row of Stern's diatomic triangle A002487.
5
1, 2, 4, 7, 12, 19, 31, 50, 81, 131, 212, 343, 555, 898, 1453, 2351, 3804, 6155, 9959, 16114, 26073, 42187, 68260, 110447, 178707, 289154, 467861, 757015, 1224876, 1981891, 3206767, 5188658, 8395425, 13584083, 21979508, 35563591, 57543099
OFFSET
1,2
LINKS
Jennifer Lansing, Largest Values for the Stern Sequence, J. Integer Seqs., 17 (2014), #14.7.5.
FORMULA
a(n) = A013655(n-1), n>3.
a(n) = a(n-1)+a(n-2), n>5. - Colin Barker, Jul 10 2015
G.f.: -x*(x^4+x^3+x^2+x+1) / (x^2+x-1). - Colin Barker, Jul 10 2015
MAPLE
A244472 := proc(n)
if n < 4 then
op(n, [1, 2, 4]) ;
else
combinat[fibonacci](n+2)-combinat[fibonacci](n-3) ;
end if;
end proc:
seq(A244472(n), n=1..50) ; # R. J. Mathar, Jul 05 2014
MATHEMATICA
CoefficientList[Series[-(x^4 + x^3 + x^2 + x + 1)/(x^2 + x - 1), {x, 0, 50}], x] (* Wesley Ivan Hurt, Jul 10 2015 *)
Join[{1, 2, 4}, LinearRecurrence[{1, 1}, {7, 12}, 50]] (* Vincenzo Librandi, Jul 11 2015 *)
PROG
(PARI) Vec(-x*(x^4+x^3+x^2+x+1)/(x^2+x-1) + O(x^100)) \\ Colin Barker, Jul 10 2015
(Magma) I:=[1, 2, 4, 7, 12]; [n le 5 select I[n] else Self(n-1)+Self(n-2): n in [1..40]]; // Wesley Ivan Hurt, Jul 10 2015
CROSSREFS
Cf. A002487, A013655, A100545 (bisection).
Sequence in context: A342229 A326080 A287525 * A279890 A018147 A125892
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jul 01 2014
STATUS
approved