OFFSET
1,3
COMMENTS
If necessary the result is rounded to the nearest integer.
LINKS
Eric Weisstein's World of Mathematics, Twin Primes
EXAMPLE
(59 + 61) / (5+9+6+1) = 120/21 = 5.7 = 6 (rounded to the nearest integer)
107 and 109 are twin primes.
Hence (107 + 109) / (1+0+7+1+0+9) = 216/18 = 12
MATHEMATICA
Floor[1/2+Total[#]/Total[Flatten[IntegerDigits/@#]]]&/@ Select[Partition[Prime[Range[500]], 2, 1], Last[#]-First[#]==2&] (* Harvey P. Dale, Mar 23 2011 *)
f[n_] := Round[2 (n + 1)/(Plus @@ IntegerDigits[n] + Plus @@ IntegerDigits[n + 2])]; f@# & /@ Select[ Prime@ Range@ 1000, PrimeQ[# + 2] &] (* Robert G. Wilson v, Aug 16 2011 *)
CROSSREFS
KEYWORD
base,nonn,less
AUTHOR
Parthasarathy Nambi, Aug 14 2010
EXTENSIONS
More terms from Harvey P. Dale, Mar 23 2011.
STATUS
approved