A346529 a(n) is the number of primes that are nearest neighbors of the n-th Ramanujan's highly composite number A002182.
1, 1, 2, 2, 2, 1, 1, 1, 2, 0, 2, 2, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 0, 0, 1, 0, 2, 0, 2, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 0
Offset: 1
Keywords
Examples
For n = 8 the 8th highly composite numbers is 48, thus its nearest neighbors are 47 and 49, only 47 is prime so a(8) = 1. For n = 9 the 9th highly composite numbers is 60, thus its nearest neighbors are 59 and 61, both are twin primes so a(9) = 2. For n = 10 the 10th highly composite numbers is 120, thus its nearest neighbors are 119 and 121, both are nonprimes so a(10) = 0.
Programs
-
Mathematica
f[n_] := Count[n + {-1, 1}, ?PrimeQ]; s = {}; dm = 0; Do[d = DivisorSigma[0, n]; If[d > dm, dm = d; AppendTo[s, f[n]]], {n, 1, 10^6}]; s (* _Amiram Eldar, Aug 17 2021 *)
Formula
Extensions
More terms from Amiram Eldar, Aug 17 2021
Comments