A360519 Let C consist of 1 together with all numbers with at least two distinct prime factors; this is the lexicographically earliest infinite sequence {a(n)} of distinct elements of C such that, for n>2, a(n) has a common factor with a(n-1) but not with a(n-2).
1, 6, 10, 35, 21, 12, 20, 55, 33, 18, 14, 77, 99, 15, 40, 22, 143, 39, 24, 28, 91, 65, 30, 34, 119, 63, 36, 26, 221, 51, 42, 38, 95, 45, 48, 44, 187, 85, 50, 46, 69, 57, 76, 52, 117, 75, 70, 58, 87, 93, 62, 56, 105, 111, 74, 68, 153, 123, 82, 80, 115, 161, 84, 60, 145, 203, 98, 54, 129, 215, 100, 66, 141
Offset: 1
Keywords
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..100000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, showing squarefree composites (in A120944) in green, numbers neither prime power nor squarefree (in A126706) in blues, highlighting powerful numbers (in A001694 and A286708) in large dark blue.
- Scott R. Shannon, White on black graph of first 10^5 terms [Some aspects of the graph are more visible when black and white are swapped. The green line is a(n) = n]
- Scott R. Shannon, Image of the first 1 million terms in color. The terms with a lowest prime factor of 2,3,5,7,9,11,13,17,19,>=23 are colored white, red, orange, yellow, green, blue, indigo, violet, gray respectively.
- N. J. A. Sloane, Table showing a(1)-a(13), also the smallest missing number (smn, A361109 and A361110), binary vectors showing which terms are divisible by the primes 2, 3, 5, 7, 11; and phi, a decimal representation of those binary vectors (A361111).
Crossrefs
Programs
-
Maple
with(numtheory); N:= 10^4: # to get a(1) to a(n) where a(n+1) is the first term > N B:= Vector(N, datatype=integer[4]): A[1]:=1; A[2]:=6; for n from 3 do for k from 10 to N do if B[k] = 0 and igcd(k, A[n-1]) > 1 and igcd(k, A[n-2]) = 1 then if nops(factorset(k) minus factorset(A[n-1])) > 0 then A[n]:= k; B[k]:= 1; break; fi; fi od: if k > N then break; fi; od: s1:=[seq(A[i], i=1..n-1)];
-
Mathematica
nn = 2^12; c[_] = False; f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]]; MapIndexed[ Set[{a[First[#2]], c[#1]}, {#1, True}] &, {1, 6}]; u = 10; i = a[1]; j = a[2]; Do[k = u; While[Nand[! PrimePowerQ[k], ! c[k], CoprimeQ[i, k], ! CoprimeQ[j, k], ! Divisible[j, f[k]]], k++]; Set[{a[n], c[k], i, j}, {k, True, j, f[k]}]; If[k == u, While[Or[c[u], PrimePowerQ[u]], u++]] , {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Mar 03 2023 *)
Comments