login
a(n) is the least k > 1 such that p(n) divides p(n^k), or 0 if no such k exists (p = A000041).
0

%I #18 Aug 06 2021 04:45:34

%S 2,3,2,3,3,6,7,2,10

%N a(n) is the least k > 1 such that p(n) divides p(n^k), or 0 if no such k exists (p = A000041).

%e a(8) = 2 because p(8) = 22 divides p(8^2) = 1741630.

%t a[n_] := Module[{k = 2, p = PartitionsP[n]}, While[! Divisible[PartitionsP[n^k], p], k++]; k]; Array[a, 9] (* _Amiram Eldar_, Aug 04 2021 *)

%o (PARI) a(n)=my(t=2); while(numbpart(n^t)%numbpart(n), t++); t

%Y Cf. A000041.

%K nonn,hard,more

%O 1,1

%A _Altug Alkan_, Jul 30 2021