A370256 The number of ways in which n can be expressed as b^2 * c^3, with b and c >= 1.
1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
1 = 1^2 * 1^3, so a(1) = 1. 64 = 1^2 * 4^3 = 8^2 * 1^3, so a(64) = 2. 4096 = 64^2 * 1^3 = 8^2 * 4^3 = 1^2 * 16^3, so a(4096)= 3.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[p_, e_] := Floor[(e + 2)/2] - Floor[(e + 2)/3]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = vecprod(apply(x -> (x+2)\2 - (x+2)\3, factor(n)[, 2]));
-
PARI
for(n=1, 100, print1(direuler(p=2, n, 1/((1 - X^2)*(1 - X^3)))[n], ", ")) \\ Vaclav Kotesovec, Feb 23 2024
-
Python
from math import prod from sympy import factorint def A370256(n): return prod((e>>1)+1-(e+2)//3 for e in factorint(n).values()) # Chai Wah Wu, Apr 15 2025
Comments