A307360 A sequence in which every divisor other than 1 is used at most three times.
1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229
Offset: 1
Examples
For instance, 8 is not in the sequence because 2, 4, and 6 are all divisible by 2 and appear previously in the sequence. The sequence, then, skips to nine. After 9, no more numbers divisible by three appear in the sequence, given that after 3 and 6, it is the third number divisible by three to appear in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Aaron Greicius, The Prime Numbers, Lecture Fall 2012.
Crossrefs
Programs
-
Maple
N:= 1000: # for terms <= N M:= Vector(N): Candidates:= {$2..N}: A[1]:= 1: for n from 2 while Candidates <> {} do A[n]:= min(Candidates): Candidates:= Candidates minus {A[n]}; for d in numtheory:-divisors(A[n]) minus {1} do M[d]:= M[d]+1; if M[d] = 3 then Candidates:= Candidates minus {seq(i,i=2*d..N, d)} fi; od; od: seq(A[i],i=1..n-1); # Robert Israel, Apr 09 2019
-
Mathematica
Select[Range@ 229, Or[# == 1, PrimeQ@ #, PrimeQ@ Sqrt@ #, And[SquareFreeQ@ #, If[PrimeNu@ # == 2, And[OddQ@ First@ #, Apply[SameQ, (# - {1, 2})/2]] &@ PrimePi[FactorInteger[#][[All, 1]]], False]]] &] (* Michael De Vlieger, Apr 11 2019 *)
-
PARI
is(n) = if(n==1, return(1)); my(f=factor(n)); if(f[, 2] == [1]~ || f[, 2] ==[2]~, return(1)); if(f[,2] == [1,1]~ && nextprime(f[1,1]+1) == f[2,1] && primepi(f[1,1]) % 2 == 1, return(1)); 0 \\ David A. Corneth, Apr 09 2019
Extensions
More terms from Jinyuan Wang, Apr 07 2019
Comments