login
A073490
Number of prime gaps in factorization of n.
17
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0
OFFSET
1,110
COMMENTS
A137723(n) is the smallest number of the first occurring set of exactly n consecutive numbers with at least one prime gap in their factorization: a(A137723(n)+k)>0 for 0<=k<n and a(A137723(n)-1)=a(A137723(n)+n)=0. - Reinhard Zumkeller, Feb 09 2008
LINKS
FORMULA
a(n) = A073484(A007947(n)).
a(A000040(n))=0; a(A000961(n))=0; a(A006094(n))=0; a(A002110(n))=0; a(A073485(n))=0.
a(A073486(n))>0; a(A073487(n)) = 1; a(A073488(n))=2; a(A073489(n))=3.
a(n)=0 iff A073483(n) = 1.
a(A097889(n)) = 0. - Reinhard Zumkeller, Nov 20 2004
0 <= a(m*n) <= a(m) + a(n) + 1. A137794(n) = 0^a(n). - Reinhard Zumkeller, Feb 11 2008
EXAMPLE
84 = 2*2*3*7 with one gap between 3 and 7, therefore a(84) = 1;
110 = 2*5*11 with two gaps: between 2 and 5 and between 5 and 11, therefore a(110) = 2.
MAPLE
A073490 := proc(n)
local a, plist ;
plist := sort(convert(numtheory[factorset](n), list)) ;
a := 0 ;
for i from 2 to nops(plist) do
if op(i, plist) <> nextprime(op(i-1, plist)) then
a := a+1 ;
end if;
end do:
a;
end proc:
seq(A073490(n), n=1..110) ; # R. J. Mathar, Oct 27 2019
MATHEMATICA
gaps[n_Integer/; n>0]:=If[n===1, 0, Complement[Prime[PrimePi[Rest[ # ]]-1], # ]&[First/@FactorInteger[n]]]; Table[Length[gaps[n]], {n, 1, 105}] (Wouter Meeussen, Oct 30 2004)
pa[n_, k_] := If[k == NextPrime[n], 0, 1]; Table[Total[pa @@@ Partition[First /@ FactorInteger[n], 2, 1]], {n, 120}] (* Jayanta Basu, Jul 01 2013 *)
PROG
(Haskell)
a073490 1 = 0
a073490 n = length $ filter (> 1) $ zipWith (-) (tail ips) ips
where ips = map a049084 $ a027748_row n
-- Reinhard Zumkeller, Jul 04 2012
(Python)
from sympy import primefactors, nextprime
def a(n):
pf = primefactors(n)
return sum(p2 != nextprime(p1) for p1, p2 in zip(pf[:-1], pf[1:]))
print([a(n) for n in range(1, 121)]) # Michael S. Branicky, Oct 14 2021
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Aug 03 2002
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 19 2006
STATUS
approved