* even more math
@ 2022-12-10 9:06 Emanuel Berg
0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2022-12-10 9:06 UTC (permalink / raw)
To: help-gnu-emacs
I saw this when we did the lambda bindings, it holds from
0 to 99 at least :)
;;; -*- lexical-binding: t -*-
;;
;; this file:
;; https://dataswamp.org/~incal/emacs-init/geh.el
(require 'cl-lib)
(defun arith-sum (n)
(cl-loop
with sum = 0
for i from 1 to (1- n)
do (cl-incf sum i)
finally return sum) )
(defun digs (n)
(* n (1- n)) )
(cl-loop
for i from 0 to 99
while (= (digs i) (* 2 (arith-sum i)))
finally return i)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-10 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-10 9:06 even more math Emanuel Berg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.