 # Generating 9-Flips

Initializing live version Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

A 9-flip is a number that when multiplied by 9 has its digits reversed (e.g. ). This Demonstration shows and counts all 9-flips for numbers with 1 to 30 digits.

[more]

9-flips with an even number of digits can be divided into two types: straddlers (shown in red and dark red) and non-straddlers (shown in blue and dark blue).

Straddlers have a central block in the middle that is a 9-flip (e.g. is in the middle of and ), while non-straddlers can be split into two 9-flips (e.g. ). The number of 9-flips with an even number of digits ( ) (as well as those with an odd number of digits) forms a Fibonacci sequence and obeys the recurrence relation .

[less]

Contributed by: Roberta Grech (February 2017)
Open content licensed under CC BY-NC-SA

## Snapshots   ## Details

The code used to generate the 9-flips was built on the solution suggested in Exercise 55 of , p. 115.

A straddler with digits can be obtained from a non-straddler with digits by inserting 1089 as a central block (shown in red) or by inserting 99 in the center of a straddler with digits (shown darker red).

A non-straddler with digits can be obtained from a non-straddler with digits by inserting 00 as a central block (shown in blue) or by inserting 8910 in the center of a straddler with digits (shown darker blue).

A 9-flip with an odd number of digits ( ) can be obtained from a straddler with digits by inserting a 9 in the center (shown red or darker red) or from a non-straddler with digits by inserting a 0 in the center (shown blue or darker blue).

Hence the number of 9-flips with an odd number of digits ( ) is equal to the number of 9-flips with an even number of digits ( ), and this sequence of numbers of 9-flips with an odd number of digits ( ) is also a Fibonacci sequence obeying the recurrence relation .

Snapshot 1: the first nonzero 9-flip is 1089 (a straddler), with four digits.

Snapshot 2: with five digits, the only 9-flip is 10989 (a straddler), obtained by inserting a 9 in the center of the four-digit flip.

Snapshot 3: with eight digits, there are two 9-flips, a straddler ( ) and a non-straddler ( ) that can be split into two halves.

Snapshot 4: with 30 digits, there are 377 9-flips, consisting of a mixture of straddlers and non-straddlers.

Reference

 A. Gardiner, Discovering Mathematics: The Art of Investigation, Mineola, NY: Dover Publications, 2006 pp. 63–118.

## Permanent Citation

Roberta Grech "Generating 9-Flips"
http://demonstrations.wolfram.com/Generating9Flips/
Wolfram Demonstrations Project
Published: February 15 2017

 Feedback (field required) Email (field required) Name Occupation Organization Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback. Send