

A178921


Product of distances between successive distinct prime divisors of n; zero if n has only 1 distinct prime factor.


0



0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 1, 0, 3, 4, 9, 0, 1, 0, 11, 0, 5, 0, 2, 0, 0, 8, 15, 2, 1, 0, 17, 10, 3, 0, 4, 0, 9, 2, 21, 0, 1, 0, 3, 14, 11, 0, 1, 6, 5, 16, 27, 0, 2, 0, 29, 4, 0, 8, 8, 0, 15, 20, 6, 0, 1, 0, 35, 2, 17, 4, 10, 0, 3, 0, 39
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,10


COMMENTS

For n <= 41, a(n) = A049087(n).


LINKS

Table of n, a(n) for n=1..82.


MATHEMATICA

f[n_] := Module[{ps}, If[n <= 1, 0, ps = Transpose[FactorInteger[n]][[1]]; Times @@ Differences[ps]]]; Table[f[n], {n, 100}] (* T. D. Noe, Aug 20 2012 *)


PROG

(Python)
#primes = [ 2, 3, ... ]
for n in range(1, 100):
d = n
prev = 0
product = 1
for p in primes:
if d%p==0:
if prev:
product *= pprev
while d%p==0:
d/=p
if d==1:
break
prev = p
if prev==0:
product = 0
print product,


CROSSREFS

Cf. A081060, A049087.
Sequence in context: A100257 A100573 A049087 * A046665 A100574 A056100
Adjacent sequences: A178918 A178919 A178920 * A178922 A178923 A178924


KEYWORD

nonn,easy


AUTHOR

Alex Ratushnyak, Aug 18 2012


STATUS

approved



