login
A349273
Number of odd divisors of prime(n) - 1.
1
1, 1, 1, 2, 2, 2, 1, 3, 2, 2, 4, 3, 2, 4, 2, 2, 2, 4, 4, 4, 3, 4, 2, 2, 2, 3, 4, 2, 4, 2, 6, 4, 2, 4, 2, 6, 4, 5, 2, 2, 2, 6, 4, 2, 3, 6, 8, 4, 2, 4, 2, 4, 4, 4, 1, 2, 2, 8, 4, 4, 4, 2, 6, 4, 4, 2, 8, 4, 2, 4, 2, 2, 4, 4, 8, 2, 2, 6, 3, 4, 4, 8, 4, 4, 4, 4, 2, 4, 4, 8, 2, 2, 6, 6, 4
OFFSET
1,4
COMMENTS
a(n) is odd if and only if prime(n) is in A249410. - Jianing Song, Nov 14 2021
LINKS
FORMULA
a(n) = A001227(A006093(n)).
MAPLE
nod:= n -> numtheory:-tau(n/2^padic:-ordp(n, 2)):
map(nod, [seq(ithprime(i)-1, i=1..100)]); # Robert Israel, Oct 11 2024
MATHEMATICA
a[n_] := DivisorSigma[0, (k = Prime[n] - 1)/2^IntegerExponent[k, 2]]; Array[a, 100] (* Amiram Eldar, Jun 03 2021 *)
Count[Divisors[#-1], _?OddQ]&/@Prime[Range[100]] (* Harvey P. Dale, Jan 22 2024 *)
PROG
(Magma) [NumberOfDivisors(p-1)/Valuation(2*p-2, 2): p in PrimesUpTo(500)];
(Python)
from sympy import divisors, prime
def a(n): return sum(d%2 for d in divisors(prime(n)-1))
print([a(n) for n in range(1, 96)]) # Michael S. Branicky, Jul 04 2021
(PARI) a(n) = sumdiv(prime(n)-1, d, d%2); \\ Michel Marcus, Dec 18 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved