This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A147645 #22 Dec 31 2023 06:23:41 %S A147645 0,0,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,0,0,2,0,0,1,0,0,1,1,0,1,1,0,1,0, %T A147645 1,1,0,0,1,0,0,2,0,0,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,2,0,0,1,0,0, %U A147645 1,1,0,1,0,0,1,0,1,1,0,0,1,0,0,2,0,0,1,0,0,1,1,0,2,0,0,1,0,1,1,0 %N A147645 Number of distinct Mersenne primes dividing n. %C A147645 a(n) = m first occurs at n = A098918(m). - _Robert Israel_, Feb 03 2020 %H A147645 Antti Karttunen, <a href="/A147645/b147645.txt">Table of n, a(n) for n = 1..131072</a> (terms 1..10000 from Robert Israel) %F A147645 From _Antti Karttunen_, May 12 2022: (Start) %F A147645 a(n) = A154402(n) - A353786(n) %F A147645 a(n) = a(2*n) = a(A000265(n)). %F A147645 a(n) <= A331410(n). (End) %F A147645 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A173898 = 0.516454... . - _Amiram Eldar_, Dec 31 2023 %e A147645 a(21)=2 because 1, 3, 7 and 21 are divisors of 21. Then 21 has two divisors that are Mersenne primes (A000668): 3 and 7. %p A147645 N:= 100: # for a(1)..a(N) %p A147645 V:= Vector(N): %p A147645 for i from 1 do %p A147645 m:= numtheory:-mersenne([i]); %p A147645 if m > N then break fi; %p A147645 for j from m by m to N do %p A147645 V[j]:= V[j]+1 %p A147645 od od: %p A147645 convert(V,list); # _Robert Israel_, Feb 03 2020 %o A147645 (PARI) A147645(n) = { my(m=3,s=0); while(m<=n, s += (isprime(m)*!(n%m)); m += (m+1)); (s); }; \\ _Antti Karttunen_, May 12 2022 %Y A147645 Cf. A000265, A000668, A001221, A080225, A098918, A154402, A173898, A353786. %Y A147645 Coincides with A331410 on A054784. %K A147645 easy,nonn %O A147645 1,21 %A A147645 _Omar E. Pol_, Nov 09 2008