OFFSET
1,1
COMMENTS
Named "Maris-McGwire-Sosa Numbers" by Keith (1998) after the baseball players Roger Maris, Mark McGwire and Sammy Sosa. Both McGwire and Sosa hit their 62nd home runs for the season, breaking Maris's record of 61 (A006145 is a similarly named sequence). - Amiram Eldar, Jun 27 2021
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Mike Keith, Maris-McGwire-Sosa Numbers, 1998.
Ivars Peterson, Home Run Numbers, MathTrek, 1998.
Wikipedia, Maris-McGwire-Sosa pair.
EXAMPLE
(61, 62) is such a pair, hence the name.
MATHEMATICA
ds[n_] := Plus @@ IntegerDigits[n]; f[n_] := ds[n] + Total[(fi = FactorInteger[n])[[;; , 2]] *( ds /@fi[[;; , 1]])]; s={}; f1 = 1; Do[f2=f[n]; If[f1 == f2, AppendTo[s, n-1]]; f1 = f2, {n, 2, 700}]; s (* Amiram Eldar, Nov 24 2019 *)
PROG
(Python)
from sympy import factorint
def sd(n): return sum(map(int, str(n)))
def f(n): return sd(n) + sum(sd(p)*e for p, e in factorint(n).items())
def ok(n): return f(n) == f(n+1)
print(list(filter(ok, range(692)))) # Michael S. Branicky, Jul 14 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Corrected and extended by David W. Wilson
Offset corrected by Amiram Eldar, Nov 24 2019
STATUS
approved