cp's OEIS Frontend

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.

A045759 Maris-McGwire numbers: numbers k such that f(k) = f(k+1), where f(k) = sum of digits of k + sum of digits of prime factors of k (including multiplicities).

This page as a plain text file.
%I A045759 #24 Jul 06 2024 11:54:31
%S A045759 7,14,43,50,61,63,67,80,84,118,122,134,137,163,196,212,213,224,241,
%T A045759 273,274,277,279,283,351,352,373,375,390,398,421,457,462,474,475,489,
%U A045759 495,510,516,523,526,537,547,555,558,577,584,590,592,616,638,644,660,673,687,691
%N A045759 Maris-McGwire numbers: numbers k such that f(k) = f(k+1), where f(k) = sum of digits of k + sum of digits of prime factors of k (including multiplicities).
%C A045759 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
%H A045759 Amiram Eldar, <a href="/A045759/b045759.txt">Table of n, a(n) for n = 1..10000</a>
%H A045759 Mike Keith, <a href="http://www.cadaeic.net/maris.htm">Maris-McGwire-Sosa Numbers</a>, 1998.
%H A045759 Ivars Peterson, <a href="https://web.archive.org/web/20130702054338/https://www.maa.org/mathland/mathtrek_9_28_98.html">Home Run Numbers</a>, MathTrek, 1998.
%H A045759 Wikipedia, <a href="https://en.wikipedia.org/wiki/Maris%E2%80%93McGwire%E2%80%93Sosa_pair">Maris-McGwire-Sosa pair</a>.
%e A045759 (61, 62) is such a pair, hence the name.
%t A045759 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 *)
%o A045759 (Python)
%o A045759 from sympy import factorint
%o A045759 def sd(n): return sum(map(int, str(n)))
%o A045759 def  f(n): return sd(n) + sum(sd(p)*e for p, e in factorint(n).items())
%o A045759 def ok(n): return f(n) == f(n+1)
%o A045759 print(list(filter(ok, range(692)))) # _Michael S. Branicky_, Jul 14 2021
%Y A045759 Cf. A006145 (Ruth-Aaron numbers), A039945.
%K A045759 nonn,base
%O A045759 1,1
%A A045759 _Mike Keith_
%E A045759 Corrected and extended by _David W. Wilson_
%E A045759 Offset corrected by _Amiram Eldar_, Nov 24 2019