A141198 a(n) is the number of divisors of n that are each one more than a power of a prime.
0, 1, 1, 2, 1, 3, 0, 3, 2, 3, 0, 5, 0, 2, 2, 3, 1, 5, 0, 5, 1, 1, 0, 7, 1, 2, 2, 4, 0, 6, 0, 4, 2, 2, 1, 7, 0, 2, 1, 6, 0, 5, 0, 3, 3, 1, 0, 8, 0, 4, 2, 3, 0, 6, 1, 5, 1, 1, 0, 10, 0, 2, 2, 4, 2, 4, 0, 4, 1, 4, 0, 10, 0, 2, 2, 3, 0, 4, 0, 7, 2, 2, 0, 9, 2, 1, 1, 4, 0, 9, 0, 2, 1, 1, 1, 9, 0, 3, 3, 6, 0, 5, 0
Offset: 1
Keywords
Examples
The divisors of 9 are 1, 3 and 9. 1 is one more than 0, not a power of a prime. 3 is one more than 2, a power of a prime. And 9 is one more than 8, a power of a prime. There are therefore 2 such divisors that are each one more than a power of a prime. So a(9) = 2.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1049 from Diana Mecum)
Programs
-
Mathematica
a[n_] := DivisorSum[n, 1 &, # == 2 || PrimePowerQ[#-1] &]; Array[a, 100] (* Amiram Eldar, Jun 22 2025 *)
-
PARI
a(n) = sumdiv(n, d, d == 2 || isprimepower(d - 1)); \\ Amiram Eldar, Jun 22 2025
Extensions
Corrected and extended by Diana L. Mecum, Jul 05 2007
Comments