OFFSET
0,14
COMMENTS
a(n) = Sum_{c} floor(c/2), where c ranges over each coefficient of terms c * x^k in the Stern polynomial B(n,x), thus sum of the halved terms (for odd terms floored down) on row n of table A125184.
LINKS
FORMULA
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]]]; A000188[n_]:= Sum[Boole[Mod[i^2, n] == 0], {i, n}]; Table[PrimeOmega[A000188[A260443[n]]], {n, 0, 120}] (* Indranil Ghosh, Mar 28 2017 *)
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From Michel Marcus
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.
A000188(n) = core(n, 1)[2]; \\ This function from Michel Marcus, Feb 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 25 2017
STATUS
approved