A246947 a(1)=30; for n > 1, a(n) is the least integer not occurring earlier such that a(n) shares exactly three distinct prime divisors with a(n-1).
30, 60, 90, 120, 150, 180, 210, 42, 84, 126, 168, 252, 294, 336, 378, 420, 70, 140, 280, 350, 490, 560, 630, 105, 315, 525, 735, 840, 240, 270, 300, 330, 66, 132, 198, 264, 396, 462, 154, 308, 616, 770, 110, 220, 440, 550, 660, 165, 495, 825, 990, 360, 390, 78
Offset: 1
Keywords
Examples
90 is in the sequence because the common prime distinct divisors between a(2)=60 and a(3)=90 are 2, 3 and 5.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..2000
Programs
-
Maple
with(numtheory):a0:={2,3,5}:lst:={}: for n from 1 to 100 do: ii:=0: for k from 30 to 50000 while(ii=0) do: y:=factorset(k):n0:=nops(y):lst1:={}: for j from 1 to n0 do: lst1:=lst1 union {y[j]}: od: a1:=a0 intersect lst1: if {k} intersect lst ={} and a1 <> {} and nops(a1)=3 then printf(`%d, `,k):lst:=lst union {k}:a0:=lst1:ii:=1: else fi: od: od:
-
Mathematica
f[s_List]:=Block[{m=s[[-1]],k=30},While[MemberQ[s,k]||Intersection[Transpose[FactorInteger[k]][[1]],Transpose[FactorInteger[m]][[1]]]=={}|| Length[Intersection[Transpose[FactorInteger[k]][[1]],Transpose[FactorInteger[m]][[1]]]]!=3,k++];Append[s,k]];Nest[f,{30},70]
-
PARI
lista(nn) = {a = 30; print1(a, ", "); fa = (factor(a)[,1])~; va = [a]; k = 0; while (k!= nn, k = 1; while (!((#setintersect(fa, (factor(k)[,1])~) == 3) && (! vecsearch(va, k))), k++); a = k; print1(a, ", "); fa = (factor(a)[,1])~; va = vecsort(concat(va, k)););} \\ Michel Marcus, Nov 24 2015
Comments