login
A396683
a(n) is the number of divisors of A006863(n).
2
1, 8, 20, 24, 24, 16, 120, 8, 56, 64, 60, 16, 144, 8, 40, 96, 64, 8, 640, 8, 144, 72, 40, 16, 336, 16, 40, 80, 48, 16, 1440, 8, 72, 96, 20, 32, 1536, 8, 20, 48, 336, 16, 720, 8, 96, 256, 40, 8, 768, 8, 160, 48, 48, 16, 1600, 48, 224, 24, 40, 8, 3456, 8, 20, 384, 80, 32, 480, 8
OFFSET
0,2
COMMENTS
For n > 1, number of k such that psi(k) divides 2*n, where psi = A002322 is the reduced totient function. In other words, number of k such that x^(2*n) == 1 (mod k) for every x coprime to k.
LINKS
FORMULA
a(n) = A000005(A006863(n)).
PROG
(PARI) a(n) = numdiv(A079612(2*n)) \\ See A079612 for its program
(Python)
from math import prod
from sympy import factorint, divisors, isprime
def A396683(n): return prod(e+2 for p, e in factorint(n).items() if p>2 and not 2*n%(p-1))*((~n & n-1).bit_length()+4)<<sum(1 for d in divisors(2*n, generator=True) if d>1 and n%(d+1) and isprime(d+1)) if n else 1 # Chai Wah Wu, Jun 02 2026
CROSSREFS
Cf. A006863, A000005, A002322, A395569 (moebius transform).
Sequence in context: A205226 A205318 A100212 * A349168 A083094 A164916
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Jun 02 2026
STATUS
approved