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.

A216169 Composite numbers > 9 which yield a prime whenever a 0 is inserted between any two digits.

This page as a plain text file.
%I A216169 #24 May 17 2018 05:33:58
%S A216169 49,119,121,133,161,169,203,253,299,301,319,323,403,407,473,493,511,
%T A216169 539,551,581,611,667,679,713,869,901,913,943,1007,1067,1079,1099,1211,
%U A216169 1273,1691,1729,1799,1909,2021,2047,2101,2117,2359,2407,2533,2717,2759,2899
%N A216169 Composite numbers > 9 which yield a prime whenever a 0 is inserted between any two digits.
%H A216169 Paolo P. Lava and Giovanni Resta, <a href="/A216169/b216169.txt">Table of n, a(n) for n = 1..10000</a> (first 1500 terms from Paolo P. Lava)
%e A216169 2359 is not prime but 23509, 23059 and 20359 are all primes.
%p A216169 A216169:=proc(q,x)
%p A216169 local a,b,c,i,n,ok;
%p A216169 for n from 10 to q do
%p A216169 if not isprime(n) then
%p A216169   a:=n; b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=n; ok:=1;
%p A216169   for i from 1 to b-1 do c:=a+9*10^i*trunc(a/10^i)+10^i*x;
%p A216169     if not isprime(c) then ok:=0; break; fi; od;
%p A216169   if ok=1 then print(n); fi;
%p A216169 fi; od; end: A216169(1000,0);
%t A216169 Select[Range[10,3000],CompositeQ[#]&&AllTrue[Table[FromDigits[ Insert[ IntegerDigits[ #],0,n]],{n,2,IntegerLength[#]}],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 13 2018 *)
%o A216169 (PARI) is(n, L=logint(n+!n, 10)+1, P)={!isprime(n) && !for(k=1, L-1, isprime([10*P=10^(L-k),1]*divrem(n, P))||return) && n>9} \\ _M. F. Hasler_, May 10 2018
%Y A216169 Subset of composite numbers in A164329. - _M. F. Hasler_, May 10 2018
%Y A216169 Cf. A068673, A068674, A068677, A068679, A069246, A215417, A215419-A215421, A216165-A216168.
%K A216169 nonn,base
%O A216169 1,1
%A A216169 _Paolo P. Lava_, Sep 03 2012
%E A216169 Name edited by _M. F. Hasler_, May 10 2018