A141345 Distance from the n-th highly composite number, A002182(n), to the next prime.
1, 1, 1, 1, 1, 5, 1, 5, 1, 7, 1, 1, 7, 7, 13, 17, 13, 1, 11, 1, 11, 1, 1, 19, 13, 1, 11, 1, 17, 1, 29, 13, 13, 1, 1, 17, 13, 23, 17, 19, 17, 17, 19, 1, 19, 23, 37, 53, 1, 17, 29, 43, 29, 1, 19, 19, 1, 23, 23, 1, 41, 41, 1, 53, 29, 19, 19, 23, 23, 47, 29, 23, 37, 1, 59, 71, 41, 1, 29, 37
Offset: 1
Keywords
Links
- T. D. Noe, Table of n, a(n) for n=1..10000
Programs
-
Mathematica
With[{s = Array[DivisorSigma[0, #] &, 10^6]}, Map[NextPrime[#] - # &@ FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* or *) Map[NextPrime[#] - # &, Import["https://oeis.org/A002182/b002182.txt", "Data"][[1 ;; 80, -1]] ] (* Michael De Vlieger, Dec 11 2020 *)
Comments