A284267 Number of terms with coefficient 1 in the Stern polynomial B(2n+1,x): a(n) = A056169(A277324(n)).
1, 2, 1, 3, 2, 2, 1, 4, 3, 1, 1, 2, 2, 2, 1, 5, 4, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 6, 5, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 7, 6, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..8192
Programs
-
Mathematica
A003961[p_?PrimeQ] := A003961[p] = Prime[ PrimePi[p] + 1]; A003961[1] = 1; A003961[n_]:= A003961[n] = Times @@ (A003961[First[#]] ^ Last[#] & ) /@ FactorInteger[n] (* after Jean-François Alcover, Dec 01 2011 *); A260443[n_]:= If[n<2, n + 1, If[EvenQ[n], A003961[A260443[n/2]], A260443[(n - 1)/2] * A260443[(n + 1)/2]]]; a[n_]:= If[n<2, 0, Count[Transpose[FactorInteger[n]][[2]], 1]]; A277324[n_]:=A260443[2n + 1]; Table[a[A277324[n]], {n, 0, 150}] (* Indranil Ghosh, Mar 28 2017 *)
-
PARI
A284267(n) = A284271(n+n+1); \\ Other code as in A284271.
-
Scheme
(define (A284267 n) (A284271 (+ n n 1))) (define (A284267 n) (A056169 (A277324 n)))
Comments