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.

A217489 Least positive integer without a digit 1, not listed earlier and not divisible by any digit of the preceding term.

This page as a plain text file.
%I A217489 #49 Jun 10 2016 00:21:00
%S A217489 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,
%T A217489 30,44,42,45,46,47,50,24,49,53,52,57,36,55,48,54,58,59,56,62,63,64,65,
%U A217489 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
%N A217489 Least positive integer without a digit 1, not listed earlier and not divisible by any digit of the preceding term.
%C A217489 This sequence contains all terms of A052383 that are not divisible by 2520. - _Peter Kagey_, Nov 04 2015
%C A217489 From _Robert Israel_, Jan 03 2016: (Start)
%C A217489 Here is a proof of Peter Kagey's comment:
%C A217489 Any number x in A052383 will eventually appear in the sequence if there are infinitely many members of the sequence containing no digit that divides x.
%C A217489 If k in A052383 is coprime to 210 (and thus not divisible by any digit > 1), then k is in the sequence.
%C A217489 The numbers 2...23 with number of 2's not divisible by 3, and 5...57 with number of 5's == 2,4 or 5 (mod 6) are coprime to 210, and thus are in the sequence.
%C A217489 The repunits k...k with k = 5 or 7 and an even number of digits are not divisible by 2 or 3, and thus they are in the sequence.
%C A217489 The repunits k...k with k = 2,3,4,6,8, or 9 and number of digits not divisible by 6 are not divisible by 5 or 7, and thus they are in the sequence. Any x in A052383 not divisible by 2520 is not divisible by one of the digits 2,3,...9, and thus is in the sequence. (End)
%H A217489 Peter Kagey, <a href="/A217489/b217489.txt">Table of n, a(n) for n = 1..10000</a>
%H A217489 E. Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/NotDivisible.htm">(n+1) is not divisible by any digit of n</a>, Oct 04 2012
%H A217489 E. Angelini, <a href="/A217489/a217489.pdf">(n+1) is not divisible by any digit of n</a> [Cached copy, with permission]
%p A217489 N:= 1000: # to get all terms before the first that exceeds N
%p A217489 A[1]:= 2:
%p A217489 Av:= remove(t -> has(convert(t,base,10),1),{$3..N}):
%p A217489 for n from 2 do
%p A217489   d:= convert(convert(A[n-1],base,10),set) minus {0};
%p A217489   Ad:= remove(t -> ormap(y -> t mod y = 0, d) , Av);
%p A217489   if nops(Ad) = 0 then break fi;
%p A217489   A[n]:= min(Ad);
%p A217489   Av:= Av minus {A[n]};
%p A217489 od:
%p A217489 seq(A[i],i=1..n-1); # _Robert Israel_, Jan 03 2016
%t A217489 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 *)
%o A217489 (PARI >= 2.6) A217489_vect(Nmax)={my(a=[],d=[0],u=0,nd); while( #a<Nmax, for( t=2,9e9, bittest(u,t) & next; for(i=1+!d[1],#d, t%d[i] || next(2)); nd=Set(digits(t)); setsearch(nd,1) & next; a=concat(a,t); u+=1<<t; d=nd; break));a}
%Y A217489 Cf. A002275, A038603, A052383.
%Y A217489 Sequence A217491 is a variant of the same idea (where injectivity is strengthened to strict monotonicity).
%K A217489 nonn,base,easy,look
%O A217489 1,1
%A A217489 _M. F. Hasler_ and _Eric Angelini_, Oct 04 2012