A287299 Number of ways of writing n as a sum of a proper prime power (A246547) and a nonprime squarefree number (A000469).
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 2, 1, 0, 1, 2, 2, 0, 0, 2, 2, 1, 1, 3, 0, 1, 1, 4, 3, 0, 2, 2, 2, 0, 3, 4, 3, 1, 2, 6, 3, 1, 0, 5, 4, 2, 2, 4, 3, 0, 2, 3, 5, 0, 1, 3, 4, 3, 2, 4, 3, 3, 4, 5, 4, 0, 2, 5, 5, 0, 4, 6, 2, 1, 1, 7, 3, 1, 2, 7, 4, 2, 4, 5, 5, 1, 3, 6, 5, 1, 3, 6, 6, 3, 4, 4, 4, 2, 4, 7, 6, 3, 1, 4, 4, 0, 4, 6, 5, 2, 2, 7, 5, 2, 1, 7, 8, 4
Offset: 0
Keywords
Examples
a(26) = 3 because we have [25, 1], [22, 4] and [16, 10].
Links
- Ilya Gutkovskiy, Extended graphical example
- Eric Weisstein's World of Mathematics, Prime Power
- Eric Weisstein's World of Mathematics, Squarefree
Programs
-
Mathematica
nmax = 120; CoefficientList[Series[(Sum[Boole[SquareFreeQ[k] && ! PrimeQ[k]] x^k, {k, 1, nmax}]) (Sum[Boole[PrimePowerQ[k] && ! PrimeQ[k]] x^k, {k, 1, nmax}]), {x, 0, nmax}], x]
-
PARI
x='x+O('x^120); concat([0, 0, 0, 0, 0], Vec(sum(k=1, 120, (issquarefree(k) && !isprime(k))*x^k) * sum(k=1, 120, (isprimepower(k) && !isprime(k))*x^k))) \\ Indranil Ghosh, May 23 2017
Comments