Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Coder's Corner » Basic Common Lisp » 2020-08-22 06:27:48

Replies: 1
;Comments in Lisp start with a semicolon.
;Every function, statement, and construct in Lisp must be surrounded by (parentheses). 
;Whitespace is ignored (but the space between arguments is required to parse correctly)
;There are multiple ways to print to the console, but I prefer (print) since it adds a newline after the string.
(print "Hello World!")
;Operations in Lisp use Polish/prefix notation, which means that the operators are placed before the objects, so 1 + 2 + 3 would look like + 1 2 3 
;11 < 20 would look like < 11 20
;So 2+(5*9)/2 would be + 2 / (* 5 9) 2
;Global variables can be defined and changed with (setq var_name "var content")
;Local variables can be defined/changed with (setf local_var "local var content")
;The basic use of the if construct is like this: (if (condition) (execute if true) (execute otherwise))
(if (> 3 20) (print "3 is less than 20"))
;You can't put 2 functions to execute on true since the second function will be executed if false
;The when construct executes function(s) when the statement is true. Basic usage: (when (statement) (action))
(setq i 10)
(when (i > 5) (print "i is greater than 5"))
;The loop construct (the most basic form of looping) keeps repeating actions until the return function is called. 
;If the return function is not called then it becomes an infinite loop.
Basic usage: (loop (actions to repeat) (when (condition to end loop) (return)))
(setq a 1)
(print a)
(setq a (+ a 1))
(when (= a 11) (return))
;Online IDE:

#2 Re: Maths Is Fun - Suggestions and Comments » this website is hard to use » 2020-08-22 04:37:00

@Hannibal lecter you can use this site to use a GUI to create the BBCode.

#3 Re: Euler Avenue » Some special numbers » 2020-07-27 06:21:43

11. Odious Numbers
In number theory, odious numbers are numbers that have an odd number of digits in their binary expansion. They determine the locations of the non-zero integers in the Thue-Morse sequence.

Some examples:

1 (1)
4 (100)
5 (101)
6 (110)
7 (111)

12. Evil Numbers
Evil numbers are the opposite of odious numbers. They have an even number of digits in their binary expansion and determine the locations of the zeroes in the Thue-Morse sequence.

Some examples:

2 (10)
3 (11)
8 (1000)
9 (1001)
10 (1010)

#4 Re: Maths Is Fun - Suggestions and Comments » this website is hard to use » 2020-07-18 14:34:33

Hannibal lecter wrote:

Hi, can you please update this website? make it easy to write math input equations use multiples away options
and make easy to copy and past an image here please no need to upload a link just copy/past the image is easier
can you do this two things please to this site? and can you use an IOS and Android app for this site?

1. Programming a graphical interface is more difficult than you think. I don't think FluxBB supports a GUI, but correct me if I'm wrong.
2. I don't see any advantages between usng a browser and an app unless you want offline functionality and things like that.

#5 Re: Dark Discussions at Cafe Infinity » Miscellaneous Math Discussion » 2020-07-14 05:45:08

bob bundy wrote:

hi pi_cubed

I tried X and Y as 2 x 2 matrices, just making up some numbers.  I didn't get the same answer evaluating X' Y' X Y and  Y' X' Y X.  It was a long calculation so I may have slipped up of course.

Did you just randomly make up the relationship, or does it come from something?


I think I read an article somewhere about it but I might have remembered it wrong.

#6 Re: Dark Discussions at Cafe Infinity » Miscellaneous Math Discussion » 2020-07-13 15:24:02

I think the group theory relationship in my signature is flawed.

#7 Re: Dark Discussions at Cafe Infinity » Miscellaneous Math Discussion » 2020-07-13 14:42:13

ganesh wrote:

Many years ago, I declared:

Sum of two cubes in two different ways (resulting in a sum which is a positive number) is 91.

Cubes numbers can be both positive and negative, aren't they?


is zero.


What do you mean by n^3 and -n^3 is zero?

#8 Dark Discussions at Cafe Infinity » Miscellaneous Math Discussion » 2020-07-13 14:01:19

Replies: 9

This thread is for posting about anything about math.
Math books, sine, recreational mathematics, etc.

#9 Re: Maths Is Fun - Suggestions and Comments » This forum has been really inactive lately... » 2020-07-12 06:04:40

I feel like no mathematical dicussions are happening and the only posts are:
1. Ganesh's daily posts
2. Posts in the "Members Only" section

#11 Re: Maths Is Fun - Suggestions and Comments » This forum has been really inactive lately... » 2020-07-08 12:00:09

Today the only posts are ganesh's daily posts and some posts in the "Members Only" section.

#12 Re: Maths Is Fun - Suggestions and Comments » This forum has been really inactive lately... » 2020-07-07 05:57:07

Nobody seems to be bothered about areas like Coder's Corner, Euler Avenue. and Formulas now.

#13 Re: Maths Teaching Resources » Learning geometry from scratch » 2020-07-06 15:05:13

How much have you fogotton? The Math(s) is Fun Advanced site can help for some things.

#14 Re: Help Me ! » All primes formula » 2020-07-06 14:26:58

Knewlogik wrote:

Well I've been crunching numbers and I figured out a way to pull the pr do I have an answer for the primes problem now all you have to do is take the number 2520 and divided by any number that is two digit add another zero if you want to do three digits add another zero if you want to do for digits add another zero if you want to do 5 digits and if the denominator of the mixed fraction is the same as the number you divided into my special number then it is a prime bottom line I've tried every prime so far has worked  example 25200/101=.             249 51/101.  just ignore the rest of the number and noticed the denominator is 101 so therefore it must be prime and only then is it prime

This is an extremely confusing process. Please explain it more clearly.

#15 Re: Science HQ » Talk about random science topics here » 2020-07-06 11:50:04

7. Quarks and leptons
Quarks and leptons are the smallest form of particles. Prtons and neutrons  are made of quarks, and electrons are simply leptons.

Can someone complete this? I don't have time now.

#16 Re: This is Cool » Po-Shen Loh discovers a new way to solve quadratic equations » 2020-07-05 13:54:49

For some reason this has double posted; could an admin delete the second one?

#19 Re: Exercises » puzzle by Xodus » 2020-07-03 14:31:10

Since 0.167=167/1000 and that is in the lowest terms, the smallest value of n must be 1000...

#20 Re: Science HQ » Talk about random science topics here » 2020-07-03 12:06:38

ganesh wrote:


* Scalar (physics), a physical quantity that can be described by a single element of a number field such as a real number
   *   Lorentz scalar, a quantity in the theory of relativity which is invariant under a Lorentz transformation
   *   Pseudoscalar, a quantity representable by a mathematical scalar that reacts sensitively to transformations changing the orientation of coordinate systems, e.g. improper rotations, or an object in Clifford algebras and similar settings
*   Scalar particle in physics is a boson subatomic particle whose spin equals zero.


In mathematics and physics, a scalar field associates a scalar value to every point in a space – possibly physical space. The scalar may either be a (dimensionless) mathematical number or a physical quantity. In a physical context, scalar fields are required to be independent of the choice of reference frame, meaning that any two observers using the same units will agree on the value of the scalar field at the same absolute point in space (or spacetime) regardless of their respective points of origin. Examples used in physics include the temperature distribution throughout space, the pressure distribution in a fluid, and spin-zero quantum fields, such as the Higgs field. These fields are the subject of scalar field theory.

I think you skipped #2.

#21 Re: Science HQ » Talk about random science topics here » 2020-07-03 12:05:11

4. Coronaviruses (Simplified)
Coronaviruses are a group of viruses that infect organisms from pangolins and bats to humans. There are 2 subgroups: Alphacoronavirus and Betacoronavirus. The human coronavriuses SARS-CoV, MERS-CoV, and SARS-CoV-2 are part of the group betacoronavirus. They primarily infect lung cells but can also infect any cells with a (certain) protein.
5. e=mc^2
This is Einstein's famous equation that solves for energy. Its meaning is:
Energy equals mass times the speed of light squared.

#22 Re: Euler Avenue » Would certain 3D objects be viewed as impossible in 4D? » 2020-07-03 11:48:18

bob bundy wrote:

I have had a loooong think and come up with this:

Firstly, I'll examine an impossible cube.  Then try to repeat this with a 4-D hypercube.

Why a cube?  Just that it's easier to write the coordinates of the corners.

Let's start with a 0-D point.  This has 1 vertex only.

In 1-D I'll consider a line.  This has 2 vertices and 1 line.  Each vertex has 1 line leading from it.

In 2-D I'll consider a square.  This has 4 vertices, and 4 lines.  Each vertex has 2 lines leading from it. These lines are at right angles.

In 3-D I'll consider a cube. This has 8 vertices, and 12 lines.  Each vertex has 3 lines leading from it.  Pairs of these lines are at right angles.  There are 6 square faces.

In 4-D I'll consider a hypercube.  By continuing the pattern this will have 16 vertices and 32 lines.  Each vertex has 4 lines leading from it.  Pairs of these lines are at right angles. There are 8 cubes.

Here's an impossible cube:

The line HD is in front of the line EF.  This is impossible.  By choosing coordinates for the position of the viewer such as (1.5, -1.5, 1.5) you can compute the distance to EF and to HD and hence show that HD is further away from the viewer.

To show a hypercube on a 2-D surface is not easy.  The usual way to to draw one cube inside another and then join corresponding vertices.  Here's my attempt:

I have tried to show the cube ADHEILPM in front of everything else.  Best I could manage so far.


What program do you use to draw these geometric shapes?

#23 Coder's Corner » Simple VBScript Programs » 2020-07-03 03:13:59

Replies: 0

Here are some simple VBScript programs.
Note: I originally had a detailed explanation for each one but this page suddenly reloaded and I don't want to retype everything sad . I'll update it later. Also, the size of the message sending input box is different from the viewing message box, so sorry if there are single quotes for new lines of comments where they aren't supposed to be and if one line spills into the other.

'These are comments in VBScript
'Strings must be in double quotes "" not single quotes ' '
'1. Msgbox
x=msgbox("Hi there", 1, "Title")
'Note: The 1 is a number that denotes the type of msgbox. It can also be some non-string text, such as vbYesNo. 'Please google it for more info
'2. Inputbox
x=inputbox("question/text", "title")
'3. Quiz with if else Elseif
a=inputbox("type yes or no for yes and maybe for no, case-sensitive", "Quiz")
dim score : score = 0
'Create a variable and define a value
if a="yes" or a="no" then
j=msgbox "yes"
score = score+1
'Set score = score+1 also works
elseif a="maybe" then
k=msgbox "no"
l=msgbox "I don't understand."
'Extra: Looping
dim var : var = 0
do until var = 11
x=msgbox(var, "loop")
'Warning: the following is an infinite loop. In some cases it can be stopped from the task manager, in some cases 'you will have to shutdown and restart your computer
message=msgbox("infinite loop", "title: infinite loop"
pi_cubed wrote:

Tell me if anything is wrong.

#24 Re: Coder's Corner » The Hexapawn Algorithm » 2020-07-03 02:23:50

Agnishom wrote:

What is a matchbox computer?

pi_cubed wrote:

See here for more information.

#25 Re: Dark Discussions at Cafe Infinity » Who was Anthony R. Brown? » 2020-07-03 02:10:22

Mathegocart wrote:

He's (most likely) mentally ill. He posts on about his chess engine on Youtube, which only works by SEVERELY handicapping Stockfish.

Also, I published a topic about his recent behavior.

I don't think his account is "GeniusIsBack", just search up Anthony R. Brown ARB and find the account where he posts about chess and go.

Board footer

Powered by FluxBB