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.

A284271 Number of terms with coefficient 1 in the Stern polynomial B(n,x): a(n) = A056169(A260443(n)).

This page as a plain text file.
%I A284271 #16 Mar 28 2017 14:53:24
%S A284271 0,1,1,2,1,1,2,3,1,2,1,2,2,1,3,4,1,3,2,1,1,1,2,2,2,2,1,2,3,1,4,5,1,4,
%T A284271 3,1,2,2,1,1,1,1,1,2,2,1,2,2,2,2,2,1,1,1,2,2,3,2,1,2,4,1,5,6,1,5,4,1,
%U A284271 3,2,1,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,1,2,2,1,2,2,2,2,2,1,2,2,1,1,1,1,1,2,2,1,2,2,3,2,2,1,1,1,2,2,4
%N A284271 Number of terms with coefficient 1 in the Stern polynomial B(n,x): a(n) = A056169(A260443(n)).
%C A284271 Number of 1's on row n of table A125184.
%H A284271 Antti Karttunen, <a href="/A284271/b284271.txt">Table of n, a(n) for n = 0..8192</a>
%F A284271 a(n) = A056169(A260443(n)).
%F A284271 Other identities and observations. For all n >= 0:
%F A284271 A002487(n) = a(n) + A284272(n).
%F A284271 a(n) <= A277700(n).
%t A284271 A003961[p_?PrimeQ] := A003961[p] = Prime[ PrimePi[p] + 1]; A003961[1] = 1; A003961[n_] := A003961[n] = Times @@ ( A003961[First[#]] ^ Last[#] & ) /@ FactorInteger[n](* _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]]; Table[a[A260443[n]], {n, 0, 150}] (* _Indranil Ghosh_, Mar 28 2017 *)
%o A284271 (PARI)
%o A284271 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From _Michel Marcus_
%o A284271 A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2)))); \\ Cf. _Charles R Greathouse IV_'s code for "ps" in A186891 and A277013.
%o A284271 A056169(n) = { my(f=factor(n)[, 2]); sum(i=1, #f, f[i]==1); }; \\ This function from _Charles R Greathouse IV_, Apr 29 2015
%o A284271 A284271(n) = A056169(A260443(n));
%o A284271 (Scheme) (define (A284271 n) (A056169 (A260443 n)))
%Y A284271 Cf. A002487, A056169, A125184, A260443, A277700, A284272, A284267 (odd bisection).
%K A284271 nonn
%O A284271 0,4
%A A284271 _Antti Karttunen_, Mar 25 2017