14 questions linked to/from It's Hip to be Square
8k views

### Is this number a factorial?

The Task Given a natural number as input, your task is to output a truthy or falsey value based on whether the input is a factorial of any natural number. You can assume that the input number will ...
• 5,074
11k views

### Am I a Fibonacci Number?

Your Task: Write a program or function to check if a number that is inputted is a Fibonacci number. A Fibonacci number is a number contained in the Fibonacci sequence. The Fibonacci Sequence is ...
• 7,235
7k views

### Is this number triangular?

Challenge Given a positive integer, determine whether it is a triangular number, and accordingly output one of any two constant, distinct values. Definition A triangular number is a number that can be ...
5k views

### User Appreciation Challenge #1: Dennis ♦

I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P ...
• 42.4k
3k views

### Sum of two squares

Given a nonnegative integer $n$, determine whether $n$ can be expressed as the sum of two square numbers, that is $\exists a,b\in\mathbb Z$ such that $n=a^2+b^2$. ...
• 4,974
2k views

### Reversed Squares

Given an integer n, your task is to determine whether it is a perfect square that when reversed, is still a perfect square. You may assume n is always positive. When numbers such as 100 (10x10) are ...
• 4,193
3k views

### In The Jailhouse Now

Challenge Given an integer n (where 4<=n<=10**6) as input create an ASCII art "prison door"* measuring ...
• 42.1k
2k views

### Maximum number of squares touched by a line segment

Consider a square grid on the plane, with unit spacing. A line segment of integer length $L$ is dropped at an arbitrary position with arbitrary orientation. The segment is said to "touch" ...
• 105k
6k views

### Match strings whose length is a fourth power

Within the scope of this question, let us consider only strings which consist of the character x repeated arbitrary number of times. For example: ...
2k views

### Is it a Giuga number?

Giuga numbers (A007850) are composite numbers $n$ such that, for each prime factor $p_i$ of $n$, $p_i \mid \left( \frac n {p_i} -1 \right)$. That is, that for each prime factor $p_i$, you ...
1k views

### Tips for golfing in Prolog

What general tips do you have for golfing in Prolog? I am looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Prolog (e.g. one letter ...
• 38.8k
1k views

### Find a Rocco number

I was asked this question in an interview but I was unable to figure out any solution. I don't know whether the question was right or not. I tried a lot but couldn't reach any solution. Honestly ...
• 231
2k views

### Is this polynomial a square?

Given an integral polynomial $p$, determine if $p$ is a square of another integral polynomial. An integral polynomial is a polynomial with only integers as coefficients. For example, $x^2+2x+1$ ...
• 48.5k
### Perfect Squares below $n$
A perfect square is an integer that is the square of an integer; in other words, it is the product of some integer with itself. Calculate the number of perfect squares below a number $n$ where \\$...