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.

A339671 a(1) = 1, a(2) = 2; for n>2, a(n) = smallest number not already used that shares a prime factor with a(n-1) and has a prime factor not in a(n-2).

This page as a plain text file.
%I A339671 #12 Dec 12 2020 21:10:33
%S A339671 1,2,4,6,3,15,5,10,8,12,9,21,7,14,16,18,20,22,11,33,24,26,13,39,27,30,
%T A339671 25,35,28,32,34,17,51,36,38,19,57,42,40,44,46,23,69,45,48,50,52,54,56,
%U A339671 49,63,60,55,65,70,58,29,87,66,62,31,93,72,64,68,74,37,111,75,78,76,80,82,41,123,81
%N A339671 a(1) = 1, a(2) = 2; for n>2, a(n) = smallest number not already used that shares a prime factor with a(n-1) and has a prime factor not in a(n-2).
%C A339671 Inspired by A064413 and A336957. The terms show a similar pattern to A064413, and like that sequence they are likely a permutation of the positive integers. Many terms also match the values in A169837. For example a(17)=20 to a(115)=111 (shifted by an index of 1) are the same, but then differ again before more matches occurr.
%C A339671 See A339670 for a similar sequence where the prime factor rules are reversed.
%e A339671 a(4) = 6 as a(3) = 4 = 2*2 and a(2) = 2, thus a(4) must contain 2 as a prime factor but must also contain a prime factor other than 2. The lowest unused number matching these criteria is 2*3 = 6.
%e A339671 a(6) = 15 as a(5) = 3 and a(4) = 6 = 2*3, thus a(6) must contain 3 as a prime factor but must also contain a prime factor other than 2 and 3. The lowest unused number matching these criteria is 3*5 = 15. This is the first term that differs from A064413.
%t A339671 Block[{a = {1, 2}, b = {}, c = {2}, p, k}, Do[k = 2; While[Nand[FreeQ[a, k], IntersectingQ[c, Set[p, FactorInteger[k][[All, 1]]]], Length@ Complement[p, Intersection[b, p]] > 0], k++]; AppendTo[a, k]; b = c; c = p, 75]; a] (* _Michael De Vlieger_, Dec 12 2020 *)
%Y A339671 Cf. A339670, A064413, A169837, A336957, A098550, A255582, A020639.
%K A339671 nonn
%O A339671 1,2
%A A339671 _Scott R. Shannon_, Dec 12 2020