A217489 Least positive integer without a digit 1, not listed earlier and not divisible by any digit of the preceding term.
2, 3, 4, 5, 6, 7, 8, 9, 20, 23, 25, 27, 29, 33, 22, 35, 26, 37, 32, 43, 34, 38, 28, 39, 40, 30, 44, 42, 45, 46, 47, 50, 24, 49, 53, 52, 57, 36, 55, 48, 54, 58, 59, 56, 62, 63, 64, 65, 67, 68, 69, 70, 60, 73, 74, 66, 75, 72, 79, 76, 80, 77, 78, 82, 83, 85, 84, 86, 87, 89, 92, 93, 88, 90
Offset: 1
Links
- Peter Kagey, Table of n, a(n) for n = 1..10000
- E. Angelini, (n+1) is not divisible by any digit of n, Oct 04 2012
- E. Angelini, (n+1) is not divisible by any digit of n [Cached copy, with permission]
Crossrefs
Programs
-
Maple
N:= 1000: # to get all terms before the first that exceeds N A[1]:= 2: Av:= remove(t -> has(convert(t,base,10),1),{$3..N}): for n from 2 do d:= convert(convert(A[n-1],base,10),set) minus {0}; Ad:= remove(t -> ormap(y -> t mod y = 0, d) , Av); if nops(Ad) = 0 then break fi; A[n]:= min(Ad); Av:= Av minus {A[n]}; od: seq(A[i],i=1..n-1); # Robert Israel, Jan 03 2016
-
Mathematica
a = {2}; Do[k = 1; While[Or[First@ DigitCount@ k > 0, MemberQ[a, k], Total[Boole@ Divisible[k, #] & /@ (IntegerDigits@ a[[n - 1]] /. 0 -> Nothing)] > 0], k++]; AppendTo[a, k], {n, 2, 74}]; a (* Michael De Vlieger, Nov 05 2015 *)
Comments