login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A188348 Distance between n and the next number with the same number of distinct prime factors. 1

%I #12 Jan 24 2020 12:13:55

%S 1,1,1,2,4,1,1,2,2,2,2,3,1,3,1,2,2,4,1,1,2,2,2,2,2,2,5,2,12,1,5,1,1,1,

%T 2,4,1,1,4,2,18,4,1,1,2,2,2,4,1,1,2,6,1,1,1,1,4,2,6,3,1,2,3,3,4,4,1,3,

%U 8,2,2,6,1,1,1,3,6,2,2,2,3,6,6,1,1,1,3,8,12

%N Distance between n and the next number with the same number of distinct prime factors.

%H Robert Israel, <a href="/A188348/b188348.txt">Table of n, a(n) for n = 2..10000</a>

%F {min d>0: A001221(n+d) = A001221(n)}.

%p N:= 200: # to use numbers up to N

%p V:= Array(2..N, n -> nops(numtheory:-factorset(n))):

%p A:= Array(2..N):

%p for n from 2 to N do

%p v:= V[n];

%p if assigned(Last[v]) then

%p A[Last[v]]:= n-Last[v]

%p fi;

%p Last[v]:= n;

%p od:

%p m:= min(select(t -> A[t]=0, [$2..N]))-1:

%p seq(A[i],i=2..m); # _Robert Israel_, Jan 24 2020

%o (PARI) for(n=2, 100, f=omega(n); m=n+1; while(omega(m)!=f, m++); print1(m-n, ", ")) \\ _Colin Barker_, Jun 27 2014

%Y Cf. A001221, A178139.

%K nonn

%O 2,4

%A _Juri-Stepan Gerasimov_, Mar 28 2011

%E Renamed, edited and checked by R. J. Mathar, Mar 28 2011.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)