14
1
Background
A Ruth-Aaron pair is a pair of consecutive positive integers n
and n+1
such that the sum of the prime factors (counting repeated prime factors) of each integer are equal. For example, (714,715)
is a Ruth-Aaron pair, since 714=2*3*7*17
, 715=5*11*13
, and 2+3+7+17=5+11+13=29
. The name Ruth-Aaron pair was chosen by Carl Pomerance in reference to Babe Ruth's career home run total of 714
, which stood as the world record from May 25, 1935 until April 8, 1974 when Hank Aaron hit his 715
th home run. You can learn more about the fascinating history of these numbers in this Numberphile video.
Goal
Write a complete program or function which, given a positive integer n
, outputs the n
th Aaron number, where the n
th number is defined to be the larger integer of the n
th Ruth-Aaron pair. Thus the n
th Aaron number is a(n)+1
, where a(n)
is the n
th term in the OEIS sequence A039752.
Test cases
The first few Aaron numbers are
6,9,16,78,126,715,949,1331,1521,1863,2492,3249,4186,4192,5406,5561,5960,6868,8281,8464,10648,12352,14588,16933,17081,18491,20451,24896,26643,26650,28449,28810,33020,37829,37882,41262,42625,43216
Rules
Standard loopholes are forbidden.
Input and output may be in any convenient format.
This is code-golf, the shortest answer (in bytes) wins.
To be sure, "counting multiplicity" means that 20 -> 2, 2, 5 not 2, 5 right? – HyperNeutrino – 2017-08-07T17:29:01.710
@Okx I was, I just noticed that when I refreshed his Youtube profile, he had exactly 1 more subscriber (not me) – Mr. Xcoder – 2017-08-07T17:30:55.303
@HyperNeutrino Yes. I'll edit to make more clear. – ngenisis – 2017-08-07T17:31:32.373
Can we choose between 0 and 1 indexing? – Mr. Xcoder – 2017-08-07T17:33:36.780
@Mr.Xcoder Yes you may – ngenisis – 2017-08-07T17:34:03.403
3I too, watched today's Numberphile video – shooqie – 2017-08-07T17:43:32.030
I predicted this... – Okx – 2017-08-07T17:51:08.830
@Okx You mean you predicted this?
– Erik the Outgolfer – 2017-08-07T18:37:17.150Just curious for 1 byte: Can I use 2 indexing? – Titus – 2017-08-07T19:40:30.710
@Titus I think that's fine – ngenisis – 2017-08-07T20:57:45.517
Oh wait ... it´s 3-indexed and saves <s>3</s> 2 bytes :D nm; that´s penny picking. I´ll go with 1-indexed. – Titus – 2017-08-07T21:06:38.413