OFFSET
1,10
COMMENTS
From Robert G. Wilson v, Aug 06 2018: (Start)
First occurrence of k, k=1,2,3,... or 0 if impossible: 1, 15, 10, 21, 14, 30, 0, 33, 22, 39, 26, 85, 0, 51, 34, 57, 38, 115, ..., ;
Impossible values: 7, 13, 19, 23, 25, 31, 33, 37, 43, 47, 49, 53, 55, 61, 63, 67, 73, 75, 79, 83, 85, 89, 91, 93, 97, ..., ;
Records: 1, 3, 5, 9, 11, 15, 17, 20, 21, 27, 29, 72, 110, 210, 272, 420, 540, 702, 812, 1190, 1482, 1640, 1980, 2262, 2550, 2592, 3192, 3422, 5280, 5760, 5852, ..., .
(End).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n) = Product(abs(p-q): p, q distinct prime factors of n).
EXAMPLE
a(42) = a(2*3*7) = |2-3|*|2-7|*|3-7| = 1*5*4 = 20.
MATHEMATICA
a[n_] := Times @@ Flatten[Differences@# & /@ Subsets[First@# & /@ FactorInteger@n, {2}]]; Array[a, 90] (* Robert G. Wilson v, Aug 06 2018 *)
PROG
(PARI) A081060(n) = if(omega(n)<=1, 1, my(ps = factor(n)[, 1]~, m=1); for(i=1, (#ps)-1, for(j=i+1, #ps, m *= (ps[j]-ps[i]))); (m)); \\ Antti Karttunen, Aug 06 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 04 2003
STATUS
approved