OFFSET
1,15
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
EXAMPLE
Divisors of 255 are [1, 3, 5, 15, 17, 51, 85, 255], of these of the form 2^k - 1 (A000225) are 1, 3, 15 and 255, but only three of them are counted (because 3 is a prime), therefore a(255) = 3.
MATHEMATICA
a[n_] := DivisorSum[n, 1 &, !PrimeQ[#] && # + 1 == 2^IntegerExponent[# + 1, 2] &]; Array[a, 120] (* Amiram Eldar, May 12 2022 *)
PROG
(PARI) A353786(n) = { my(m=1, s=0); while(m<=n, s += (!isprime(m))*!(n%m); m += (m+1)); (s); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 12 2022
STATUS
approved