26 lines
1.6 KiB
Text
26 lines
1.6 KiB
Text
;Definitions and restrictions:
|
|
'''Rare''' numbers are positive integers <big> '''n''' </big> where:
|
|
:::* <big> '''n''' </big> is expressed in base ten
|
|
:::* <big> '''r''' </big> is the reverse of <big> '''n''' </big> (decimal digits)
|
|
:::* <big> '''n''' </big> must be non-palindromic <big>('''n''' ≠ '''r''')</big>
|
|
:::* <big> '''(n+r)''' </big> is the '''sum'''
|
|
:::* <big> '''(n-r)''' </big> is the '''difference''' and must be positive
|
|
:::* the '''sum''' and the '''difference''' must be perfect squares
|
|
|
|
|
|
;Task:
|
|
:* find and show the first '''5''' ''rare'' numbers
|
|
:* find and show the first '''8''' ''rare'' numbers (''optional'')
|
|
:* find and show more ''rare'' numbers (''stretch goal'')
|
|
|
|
|
|
Show all output here, on this page.
|
|
|
|
|
|
;References:
|
|
:* an OEIS entry: [http://oeis.org/A035519 A035519 rare numbers].
|
|
:* an OEIS entry: [http://oeis.org/A059755 A059755 odd rare numbers].
|
|
:* planetmath entry: [https://www.planetmath.org/RareNumbers rare numbers]. (some hints)
|
|
:* author's website: [http://www.shyamsundergupta.com/rare.html rare numbers] by Shyam Sunder Gupta. (lots of hints and some observations).
|
|
<br><br>
|
|
|