cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A327804 Leading coefficient of the n-th Stern polynomial.

This page as a plain text file.
%I A327804 #6 Sep 26 2019 08:07:06
%S A327804 0,1,1,1,1,2,1,1,1,1,2,1,1,2,1,1,1,1,1,3,2,3,1,1,1,1,2,1,1,2,1,1,1,1,
%T A327804 1,2,1,1,3,2,2,2,3,1,1,2,1,1,1,1,1,3,2,3,1,1,1,1,2,1,1,2,1,1,1,1,1,2,
%U A327804 1,1,2,1,1,1,1,4,3,5,2,2,2,2,2,5,3,4,1,1,1,1,2
%N A327804 Leading coefficient of the n-th Stern polynomial.
%H A327804 A. Schinzel, <a href="https://doi.org/10.1007/978-3-319-28203-9_25">The leading coefficients of Stern polynomials</a>, in: From Arithmetic to Zeta-Functions: Number Theory in Memory of Wolfgang Schwarz (J. Sander et al., eds.), Springer, 2016, 427-434.
%t A327804 B[0, _] = 0; B[1, _] = 1; B[n_, t_] := B[n, t] = If[EvenQ[n], t B[n/2, t], B[1 + (n-1)/2, t] + B[(n-1)/2, t]];
%t A327804 a[n_] := Coefficient[B[n, t], t, Exponent[B[n, t], t]]; a[0] = 0;
%t A327804 a /@ Range[0, 90] (* _Jean-François Alcover_, Sep 26 2019, from A125184 *)
%o A327804 (PARI) pol(n) = {if (n<2, return (n)); if (n%2, pol((n+1)/2) + pol((n-1)/2), x*pol(n/2));}
%o A327804 a(n) = my(p=pol(n)); if (p==0, 0, polcoef(p, poldegree(p)));
%Y A327804 Cf. A125184, A277314, A277315.
%K A327804 nonn
%O A327804 0,6
%A A327804 _Michel Marcus_, Sep 26 2019