|
%I
%S 55,91,187,247,391,667,1147,1591,1927,2491,3127,4087,4891,5767,7387,
%T 9991,10807,11227,12091,17947,23707,25591,28891,30967,37627,38407,
%U 51067,52891,55687,64507,67591,70747,75067,78391,96091,98587,111547,122491
%N Product of the n-th sexy prime pair.
%C Solutions of the equation n'=2*sqrt(n+9), where n' is the arithmetic derivative of n. [_Paolo P. Lava_, Oct 30 2012]
%H _Reinhard Zumkeller_, <a href="/A111192/b111192.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SexyPrimes.html">Sexy Primes</a>.
%F a(n) = A023201(n) * A046117(n). [_Reinhard Zumkeller_, Sep 13 2011]
%e a(2)=91 because the second sexy prime pair is (7, 13) and 7*13=91.
%p with(numtheory);
%p A111192:= proc(i)
%p local n,p;
%p for n from 1 to i do
%p if n*add(op(2,p)/op(1,p),p= ifactors(n)[2])=2*sqrt(n+9) then print(n); fi;
%p od; end:
%p A111192(1000000); # _Paolo P. Lava_, Oct 30 2012
%t #(#+6)&/@Select[Prime[Range[100]], PrimeQ[#+6]&] [_Harvey P. Dale_, Dec. 17, 2010]
%t (* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is not in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {6}]; Select[ Range[125000], fQ] (* _Robert G. Wilson v_, Feb 08 2012 *)
%o (Haskell)
%o a111192 n = a111192_list !! (n-1)
%o a111192_list = f a000040_list where
%o f (p:ps@(q:r:_)) | q - p == 6 = (p*q) : f ps
%o | r - p == 6 = (p*r) : f ps
%o | otherwise = f ps
%o -- _Reinhard Zumkeller_, Sep 13 2011
%Y Cf. A023201, A104229.
%Y Cf. A037074, A143206, A195118; intersection of A143205 and A001358.
%K nonn
%O 1,1
%A Shawn M Moore (sartak(AT)gmail.com), Oct 23 2005
|