A359421 a(n) = number of abelian groups of order p^2 - 1, where p = prime(n).
1, 3, 3, 5, 3, 3, 14, 6, 5, 3, 11, 6, 5, 3, 7, 9, 3, 3, 3, 10, 10, 7, 3, 10, 22, 6, 5, 9, 9, 7, 44, 3, 5, 3, 6, 10, 3, 15, 5, 3, 6, 6, 15, 15, 12, 20, 3, 11, 3, 3, 10, 7, 14, 18, 30, 5, 9, 21, 3, 5, 3, 6, 6, 5, 5, 3, 3, 14, 3, 6, 11, 10, 7, 3, 9, 22, 3, 6, 14
Offset: 1
Keywords
Examples
For p = 5, p^2 - 1 = 24 = 2^3 * 3^1. The number of abelian groups of order 24 = (the number of partitions of 3)*(the number of partitions of 1) = 3*1 = 3.
Programs
-
Maple
a:= n-> mul(combinat[numbpart](i[2]), i=ifactors(ithprime(n)^2-1)[2]): seq(a(n), n=1..79); # Alois P. Heinz, Dec 31 2022
-
Mathematica
A000688[n_] := Times @@ (PartitionsP /@ FactorInteger[n][[All, 2]]); a[n_] := A000688[Prime[n]^2 - 1]; Table[a[n], {n, 1, 79}] (* Jean-François Alcover, Feb 03 2025 *)
-
Python
from sympy import factorint, npartitions from math import prod def A359421(n): return prod(npartitions(d) for d in factorint(prime(n)**2-1).values()) # Chai Wah Wu, Jan 12 2023