login
A346529
a(n) is the number of primes that are nearest neighbors of the n-th Ramanujan's highly composite number A002182.
1
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,3
COMMENTS
Terms are only 0, 1 or 2.
FORMULA
a(n) = A010051(A002182(n)-1) + A010051(A002182(n)+1). - Michel Marcus, Aug 17 2021
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Aug 17 2021
EXTENSIONS
More terms from Amiram Eldar, Aug 17 2021
STATUS
approved