cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A246946 a(1)=6; for n > 1, a(n) is the least integer not occurring earlier such that a(n) shares exactly two distinct prime divisors with a(n-1).

This page as a plain text file.
%I A246946 #15 Nov 24 2015 04:40:17
%S A246946 6,12,18,24,30,10,20,40,50,60,15,45,75,90,36,42,14,28,56,70,35,105,21,
%T A246946 63,84,48,54,66,22,44,88,110,55,165,33,99,132,72,78,26,52,104,130,65,
%U A246946 195,39,117,156,96,102,34,68,136,170,80,100,120,108,114,38,76
%N A246946 a(1)=6; for n > 1, a(n) is the least integer not occurring earlier such that a(n) shares exactly two distinct prime divisors with a(n-1).
%C A246946 All terms belong to A024619. Is this a permutation of A024619? - _Michel Marcus_, Nov 23 2015
%H A246946 Michel Lagneau, <a href="/A246946/b246946.txt">Table of n, a(n) for n = 1..2000</a>
%e A246946 18 is in the sequence because the common prime distinct divisors between a(2)=12 and a(3)=18 are 2 and 3.
%p A246946 with(numtheory):a0:={2,3}:lst:={}:
%p A246946 for n from 6 to 100 do:
%p A246946   ii:=0:
%p A246946     for k from 3 to 50000 while(ii=0) do:
%p A246946       y:=factorset(k):n0:=nops(y):lst1:={}:
%p A246946         for j from 1 to n0 do:
%p A246946         lst1:=lst1 union {y[j]}:
%p A246946         od:
%p A246946          a1:=a0 intersect lst1:
%p A246946          if {k} intersect lst ={} and a1 <> {} and nops(a1)=2
%p A246946           then
%p A246946           printf(`%d, `,k):lst:=lst union {k}:a0:=lst1:ii:=1:
%p A246946          else
%p A246946          fi:
%p A246946       od:
%p A246946   od:
%t A246946 f[s_List]:=Block[{m=s[[-1]],k=6},While[MemberQ[s,k]||Intersection[Transpose[FactorInteger[k]][[1]],Transpose[FactorInteger[m]][[1]]]=={}|| Length[Intersection[Transpose[FactorInteger[k]][[1]],Transpose[FactorInteger[m]][[1]]]]!=2,k++];Append[s,k]];Nest[f,{6},71]
%o A246946 (PARI) lista(nn) = {a = 6; print1(a, ", "); fa = (factor(a)[,1])~; va = [a]; k = 0; while (k != nn, k = 1; while (!((#setintersect(fa, (factor(k)[,1])~) == 2) && (! vecsearch(va, k))), k++); a = k; print1(a, ", "); fa = (factor(a)[,1])~; va = vecsort(concat(va, k)););} \\ _Michel Marcus_, Nov 23 2015
%Y A246946 Cf. A184992, A245481, A246947.
%K A246946 nonn
%O A246946 1,1
%A A246946 _Michel Lagneau_, Sep 08 2014