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.
%I A191647 #32 Dec 07 2019 12:18:26 %S A191647 3,4,5,10,14,16,40,46,100,145,149,251,340,373,406,424,439,466,539,556, %T A191647 571,575,617,619,628,629,655,676,689,724,760,779,794,899,901,941,970, %U A191647 989,1019,1055,1070,1076,1183,1213,1226,1231,1258,1270,1285,1331,1340 %N A191647 Numbers n with property that the concatenation of their anti-divisors is a prime. %C A191647 Similar to A120712 which uses the proper divisors of n. %H A191647 Klaus Brockhaus <a href="/A191647/b191647.txt">Table of n, a(n) for n = 1..1000</a> (first 250 terms from Paolo P. Lava) %e A191647 The anti-divisors of 40 are 3, 9, 16, 27, and 391627 is prime, hence 40 is in the sequence. %p A191647 P:=proc(i) local a,b,c,d,k,n,s,v; v:=array(1..200000); %p A191647 for n from 3 by 1 to i do k:=2; b:=0; %p A191647 while k<n do if (k mod 2)=0 then %p A191647 if (n mod k)>0 and (2*n mod k)=0 then b:=b+1; v[b]:=k; fi; %p A191647 else %p A191647 if (n mod k)>0 and (((2*n-1) mod k)=0 or ((2*n+1) mod k)=0) then %p A191647 b:=b+1; v[b]:=k; fi; fi; k:=k+1; od; a:=v[1]; %p A191647 for s from 2 to b do a:=a*10^floor(1+evalf(log10(v[s])))+v[s]; od; %p A191647 if isprime(a) then print(n); fi; %p A191647 od; end: P(10^6); %t A191647 antiDivisors[n_Integer] := Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]; a191647[n_Integer] := Select[Range[n], %t A191647 PrimeQ[FromDigits[Flatten[IntegerDigits /@ antiDivisors[#]]]] &]; a191647[1350] (* _Michael De Vlieger_, Aug 09 2014, "antiDivisors" after _Harvey P. Dale_ at A066272 *) %o A191647 (Python) %o A191647 from sympy import isprime %o A191647 [n for n in range(3,10**4) if isprime(int(''.join([str(d) for d in range(2,n) if n%d and 2*n%d in [d-1,0,1]])))] # _Chai Wah Wu_, Aug 08 2014 %Y A191647 Cf. A037279, A066272, A106708, A120712, A120716, A191648. %K A191647 nonn,base %O A191647 1,1 %A A191647 _Paolo P. Lava_, Jun 10 2011 %E A191647 a(618) corrected in b-file by _Paolo P. Lava_, Feb 28 2018