### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Tantalizer 452: Snailspaces | |

Brian Gladman on Enigma 1061: Par is never… | |

Hugh Casement on Enigma 1061: Par is never… | |

Jim Randell on Enigma 1061: Par is never… | |

geoffrounce on Puzzle 47: Digits all wro… |

### Archives

### Categories

- article (11)
- enigma (1,175)
- misc (2)
- project euler (2)
- puzzle (44)
- site news (46)
- tantalizer (48)
- teaser (3)

### Site Stats

- 183,007 hits

Advertisements

The hard part of this problem is the analysis to limit the number of integers we need to consider:

The procedure followed, starting with integer

nis:Now consider:

writing

p = 4n^2 + 2n + 1:so:

also:

So for

n < -1orn > 3we have:i.e.

16 f(n)lies between 2 consecutive squares, so it cannot be a perfect square.Now suppose

f(n) = q^2for some integerq, then:But

16 f(n)cannot be a perfect square, hence neither canf(n).So we only need to explore values for n = -1, 0, 1, 2, 3, which we can do by hand or by program:

Solution:The number first thought of was 3.