cp's OEIS Frontend

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.

A353786 Number of distinct nonprime numbers of the form 2^k - 1 that divide n.

This page as a plain text file.
%I A353786 #15 Dec 31 2023 03:40:37
%S A353786 1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,
%T A353786 1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,
%U A353786 1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
%N A353786 Number of distinct nonprime numbers of the form 2^k - 1 that divide n.
%H A353786 Antti Karttunen, <a href="/A353786/b353786.txt">Table of n, a(n) for n = 1..100000</a>
%F A353786 a(n) = A154402(n) - A147645(n).
%F A353786 a(n) = a(2*n) = a(A000265(n)).
%F A353786 For all primes p, a(p) = 1.
%F A353786 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n>=2} 1/A135972(n) = A065442 - A173898 = 1.0902409734... . - _Amiram Eldar_, Dec 31 2023
%e A353786 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.
%t A353786 a[n_] := DivisorSum[n, 1 &, !PrimeQ[#] && # + 1 == 2^IntegerExponent[# + 1, 2] &]; Array[a, 120] (* _Amiram Eldar_, May 12 2022 *)
%o A353786 (PARI) A353786(n) = { my(m=1,s=0); while(m<=n, s += (!isprime(m))*!(n%m); m += (m+1)); (s); };
%Y A353786 Cf. A000225, A000265, A147645, A154402.
%Y A353786 Cf. A065442, A135972, A173898.
%K A353786 nonn
%O A353786 1,15
%A A353786 _Antti Karttunen_, May 12 2022