OFFSET
1,2
COMMENTS
PROG
(PARI)
A007814(n) = valuation(n, 2);
A336931(n) = { my(f=factor(n)); sum(i=1, #f~, (f[i, 2]%2) * (A007814(1+nextprime(1+f[i, 1]))-1)); };
isA336930(n) = !A336931(n);
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
isA004613(n) = (1==(n%4) && 1==factorback(factor(n)[, 1]%4)); \\ After code in A004613.
isA336930(n) = isA004613(A003961(core(n)));
(Python)
from math import prod
from itertools import count, islice
from sympy import factorint, nextprime, divisor_count
def A336930_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:(~(m:=prod(((q:=nextprime(p))**(e+1)-1)//(q-1) for p, e in factorint(n).items()))& m-1).bit_length()==(~(k:=int(divisor_count(n))) & k-1).bit_length(), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 17 2020
STATUS
approved