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.

A309489 Numbers k such that the sum of digits in odd places is equal to the sum of digits in even places in k!.

This page as a plain text file.
%I A309489 #36 Jun 04 2025 18:46:28
%S A309489 11,18,20,25,27,28,32,35,41,43,51,57,60,68,72,74,80,102,105,107,113,
%T A309489 121,122,138,140,145,156,161,166,171,228,233,245,282,301,307,308,311,
%U A309489 315,329,333,335,340,347,349,351,353,366,386,412,420,454,469,478
%N A309489 Numbers k such that the sum of digits in odd places is equal to the sum of digits in even places in k!.
%C A309489 Numbers k such that A000142(k) is a term of A135499. - _Michel Marcus_, Aug 04 2019
%H A309489 Daniel Starodubtsev, <a href="/A309489/b309489.txt">Table of n, a(n) for n = 1..300</a>
%t A309489 aQ[n_] := Total[(d = IntegerDigits[n!])[[1;;-1;;2]]] == Total[d[[2;;-1;;2]]]; Select[Range[500], aQ] (* _Amiram Eldar_, Aug 04 2019 *)
%t A309489 sdoeQ[n_]:=With[{nf=IntegerDigits[n!]},Total[Take[nf,{1,-1,2}]]==Total[Take[nf,{2,-1,2}]]]; Select[Range[500],sdoeQ] (* _Harvey P. Dale_, Jun 04 2025 *)
%o A309489 (PARI) isok(k) = {my(d = digits(k!), so=0, se=0); for (i=1, #d, if (i%2, so += d[i], se += d[i])); so == se; } \\ _Michel Marcus_, Aug 04 2019
%o A309489 (Python)
%o A309489 def c(n): s = str(n); return sum(map(int, s[::2])) == sum(map(int, s[1::2]))
%o A309489 def afind(limit):
%o A309489     k, factk = 1, 1
%o A309489     while k <= limit:
%o A309489         if c(factk): print(k, end=", ")
%o A309489         k += 1; factk *= k
%o A309489 afind(500) # _Michael S. Branicky_, Nov 18 2021
%Y A309489 Cf. A000142 (n!), A135499.
%K A309489 nonn,base
%O A309489 1,1
%A A309489 _Daniel Starodubtsev_, Aug 04 2019