Showing posts with label numerator. Show all posts
Showing posts with label numerator. Show all posts

Friday, 20 February 2026

Rational Generating Functions

I noticed that the number associated with my diurnal age today can be generated from the expansion of:$$ \frac{1-x}{1-x-x^2-2x^3+2x^4} $$I also noticed there is an associated fourth order linear recurrence:$$ \begin{align} &\text{a}(n) = \text{a}(n-1) + \text{a}(n-2) + 2\text{a}(n-3) - 2\text{a}(n-4) \\ &\text{with } \text{a}(0)=1, \text{a}(1)=0, \text{a}(2)=1, \text{a}(3)=3 \end{align} $$Having just posted about converting polynomials to linear recurrences, I was curious as to how to could be done for rational expressions involving two polynomials, one the numerator and the other the denominator. I asked Gemini the following:

Can expressions like \( \dfrac{1-x}{1-x-x^2-2x^3+2x^4} \) which are not polynomials still be expressed as fourth order linear recurrences and if so, how that be accomplished using this expression as an example.

Here was the response:

Yes, expressions like this can absolutely be expressed as linear recurrences. In mathematics, an expression in the form of a ratio of two polynomials is known as a rational generating function.

The sequence of coefficients generated by expanding this fraction directly corresponds to a linear recurrence relation. Specifically:

  • The denominator dictates the recurrence relation itself (the multipliers and the order).
  • The numerator determines the initial conditions (the starting values of the sequence).

Here is the complete step-by-step breakdown of how to extract the fourth-order linear recurrence and its initial conditions from your specific example.

1. Set Up the Generating Function Equation

Let the rational expression equal a formal power series, where $a_n$ represents the $n$-th term of the sequence we want to find:

$$\sum_{n=0}^{\infty} a_n x^n = \frac{1-x}{1-x-x^2-2x^3+2x^4}$$

2. Isolate the Sequence

To relate the coefficients, multiply both sides of the equation by the denominator:

$$(1-x-x^2-2x^3+2x^4) \sum_{n=0}^{\infty} a_n x^n = 1-x$$

Next, expand the left side by distributing the sequence across the terms of the polynomial. This creates shifted versions of the sequence:

$$\sum_{n=0}^{\infty} a_n x^n - \sum_{n=0}^{\infty} a_n x^{n+1} - \sum_{n=0}^{\infty} a_n x^{n+2} - 2\sum_{n=0}^{\infty} a_n x^{n+3} + 2\sum_{n=0}^{\infty} a_n x^{n+4} = 1-x$$

3. Extract the Recurrence Relation

To find the general recurrence relation, look at the coefficient of $x^n$ for any $n \ge 4$. On the right side of the equation ($1-x$), there are no terms with $x^4$ or higher, so the coefficient for $x^n$ on the right side is 0.

Equating the coefficients of $x^n$ on both sides gives:

$$a_n - a_{n-1} - a_{n-2} - 2a_{n-3} + 2a_{n-4} = 0$$

By isolating $a_n$, we get the fourth-order linear recurrence:

$$a_n = a_{n-1} + a_{n-2} + 2a_{n-3} - 2a_{n-4}$$

4. Determine the Initial Conditions

To compute the sequence, we need the first four values ($a_0, a_1, a_2, a_3$). We find these by equating the coefficients for the lowest powers of $x$ ($x^0, x^1, x^2, x^3$) on both sides of our expanded equation.

  • For $x^0$ (constant term):
    $a_0 = 1$

  • For $x^1$: 
    $a_1 - a_0 = -1 \implies a_1 - 1 = -1 \implies a_1 = 0$

  • For $x^2$: 
    $a_2 - a_1 - a_0 = 0 \implies a_2 - 0 - 1 = 0 \implies a_2 = 1$

  • For $x^3$: 
    $a_3 - a_2 - a_1 - 2a_0 = 0 \implies a_3 - 1 - 0 - 2(1) = 0 \implies a_3 = 3$

The recurrence sequence is fully defined by $a_n = a_{n-1} + a_{n-2} + 2a_{n-3} - 2a_{n-4}$ with initial conditions $\{1, 0, 1, 3\}$.

Tuesday, 1 July 2025

An Unusual Application of Continued Fractions

Yesterday I turned 27487 days old. This is a prime number of days and this number together with the next three prime numbers form the following sequence:$$27847, 27851, 27883, 27893$$Now let's combine these numbers together to from a continued fraction:

                    1            
27847 + -------------------------
                        1        
         27851 + ----------------
                             1   
                  27883 + -------
                           27893 

This continued fraction is equivalent to the improper fraction:$$ \dfrac{603189725547991331} {21660851250413}$$with both numerator and denominator being prime. The first of the primes, 27847, qualifies it for membership in OEIS A270884:


A270884: smallest of FOUR consecutive prime numbers that when represented as a simple continued fraction, generates prime numbers in the numerator and denominator, when reduced.


The initial members are (permalink):

41, 367, 619, 659, 701, 2267, 2789, 3253, 3463, 6917, 8969, 9221, 11959, 13499, 14431, 17359, 17851, 20143, 22283, 23669, 26107, 27847, 28547, 28879, 29537, 32503, 32717, 32987, 37549

Let's look at the first of these numbers, 41, for another example. The four primes are thus 41, 43, 47 and 53.

            1        
41 + ----------------
               1     
      43 + ----------
                  1  
            47 + ----
                  53 

Here the continued fraction is equal to:$$ \frac{4398061} {107209}$$with both numerator and denominator being prime. Up to one million, the continued fractions of five and six runs of consecutive primes do not produce improper fractions with numerators and denominators that are prime. However, some runs of seven consecutive primes do. Up to 40,000 these are 223, 1579, 5881, 8293, 9013, 12347, 15121, 17783, 25523 and 38903 (permalink). Let's look at the first of these: 223.

                         1                    
223 + ----------------------------------------
                             1                
       227 + ---------------------------------
                                1             
              229 + --------------------------
                                    1         
                     233 + -------------------
                                       1      
                            239 + ------------
                                           1  
                                   241 + -----
                                          251 

This produces the fraction:$$ \frac{39053357680436977}{175123705045789} $$with both numerator and denominator prime. No numbers satisfy for runs of eight and nine consecutive primes but for runs of ten we have 5519, 13037, 18743 and 39857 (permalink). Let's look at 5519. The continued fraction (this time in compact format) is:$$ \begin{align} &5519; 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591]\\  \\ &= \frac{27886154132102326260514832393879709899}{5052754705003449540186402260387567} \end{align}$$with the numerator and denominator prime.

Friday, 29 November 2024

Farey Fractions

The number associated with my diurnal age today is 27634 and one its properties qualifies for membership in OEIS A119015:


A119015
: denominators of "Farey fraction" approximations to \(e\).

I couldn't understand the explanation in the OEIS comments about how these fractions were formed but an investigation of the number in this blog revealed that I'd already dealt with these types of fractions as applied to \(e\) before in a post titled The Mediant on the 5th November 2022. The explanation in that post is much easier to understand but in it I'd only considered the fractions themselves and not their numerators and denominators considered separately, as part of different sequences. The denominator sequence is linked above and here is the corresponding sequence for the numerators:


A119014: numerators of "Farey fraction" approximations to \(e\).

Here are the fractions again (permalink):

5/2, 8/3, 11/4, 19/7, 30/11, 49/18, 68/25, 87/32, 106/39, 193/71, 299/110, 492/181, 685/252, 878/323, 1071/394, 1264/465, 1457/536, 2721/1001, 4178/1537, 6899/2538, 9620/3539, 12341/4540, 15062/5541, 17783/6542, 20504/7543, 23225/8544, 25946/9545, 49171/18089, 75117/27634, 124288/45723, 173459/63812, 222630/81901, 271801/99990, 320972/118079, 370143/136168, 419314/154257, 468485/172346, 517656/190435, 566827/208524, 1084483/398959

Here are the Farey fraction denominators (permalink):

2, 3, 4, 7, 11, 18, 25, 32, 39, 71, 110, 181, 252, 323, 394, 465, 536, 1001, 1537, 2538, 3539, 4540, 5541, 6542, 7543, 8544, 9545, 18089, 27634, 45723, 63812, 81901, 99990, 118079, 136168, 154257, 172346, 190435, 208524, 398959

Here are the Farey fraction numerators (permalink):

5, 8, 11, 19, 30, 49, 68, 87, 106, 193, 299, 492, 685, 878, 1071, 1264, 1457, 2721, 4178, 6899, 9620, 12341, 15062, 17783, 20504, 23225, 25946, 49171, 75117, 124288, 173459, 222630, 271801, 320972, 370143, 419314, 468485, 517656, 566827, 1084483

There are OEIS entries for the numerators and denominators of the Farey fraction approximations to most of the standard constants e.g. \( \pi \). Here are the Farey fractions together with their numerators and denominators for \( \pi \):

The progressive list of approximating Farey fractions is given by (permalink):

[7/2, 10/3, 13/4, 16/5, 19/6, 22/7, 25/8, 47/15, 69/22, 91/29, 113/36, 135/43, 157/50, 179/57, 201/64, 223/71, 245/78, 267/85, 289/92, 311/99, 333/106, 355/113, 688/219, 1043/332, 1398/445, 1753/558, 2108/671, 2463/784, 2818/897, 3173/1010, 3528/1123, 3883/1236, 4238/1349, 4593/1462, 4948/1575, 5303/1688, 5658/1801, 6013/1914, 6368/2027, 6723/2140, 7078/2253, 7433/2366, 7788/2479, 8143/2592, 8498/2705, 8853/2818, 9208/2931, 9563/3044, 9918/3157, 10273/3270, 10628/3383, 10983/3496, 11338/3609, 11693/3722, 12048/3835, 12403/3948, 12758/4061, 13113/4174, 13468/4287, 13823/4400, 14178/4513, 14533/4626, 14888/4739, 15243/4852, 15598/4965, 15953/5078, 16308/5191, 16663/5304, 17018/5417, 17373/5530, 17728/5643, 18083/5756, 18438/5869, 18793/5982, 19148/6095, 19503/6208, 19858/6321, 20213/6434, 20568/6547, 20923/6660, 21278/6773, 21633/6886, 21988/6999, 22343/7112, 22698/7225, 23053/7338, 23408/7451, 23763/7564, 24118/7677, 24473/7790, 24828/7903, 25183/8016, 25538/8129, 25893/8242, 26248/8355, 26603/8468, 26958/8581, 27313/8694, 27668/8807, 28023/8920, 28378/9033, 28733/9146, 29088/9259, 29443/9372, 29798/9485, 30153/9598, 30508/9711, 30863/9824, 31218/9937, 31573/10050, 31928/10163, 32283/10276, 32638/10389, 32993/10502, 33348/10615, 33703/10728, 34058/10841, 34413/10954, 34768/11067, 35123/11180, 35478/11293, 35833/11406, 36188/11519, 36543/11632, 36898/11745, 37253/11858, 37608/11971, 37963/12084, 38318/12197, 38673/12310, 39028/12423, 39383/12536, 39738/12649, 40093/12762, 40448/12875, 40803/12988, 41158/13101, 41513/13214, 41868/13327, 42223/13440, 42578/13553, 42933/13666, 43288/13779, 43643/13892, 43998/14005, 44353/14118, 44708/14231, 45063/14344, 45418/14457, 45773/14570, 46128/14683, 46483/14796, 46838/14909, 47193/15022, 47548/15135, 47903/15248, 48258/15361, 48613/15474, 48968/15587, 49323/15700, 49678/15813, 50033/15926, 50388/16039, 50743/16152, 51098/16265, 51453/16378, 51808/16491, 52163/16604, 52518/16717, 52873/16830, 53228/16943, 53583/17056, 53938/17169, 54293/17282, 54648/17395, 55003/17508, 55358/17621, 55713/17734, 56068/17847, 56423/17960, 56778/18073, 57133/18186, 57488/18299, 57843/18412, 58198/18525, 58553/18638, 58908/18751, 59263/18864, 59618/18977, 59973/19090, 60328/19203, 60683/19316, 61038/19429, 61393/19542, 61748/19655, 62103/19768, 62458/19881, 62813/19994, 63168/20107, 63523/20220, 63878/20333, 64233/20446, 64588/20559, 64943/20672, 65298/20785, 65653/20898, 66008/21011, 66363/21124, 66718/21237, 67073/21350, 67428/21463, 67783/21576, 68138/21689, 68493/21802, 68848/21915, 69203/22028, 69558/22141, 69913/22254, 70268/22367, 70623/22480, 70978/22593, 71333/22706, 71688/22819, 72043/22932, 72398/23045, 72753/23158, 73108/23271, 73463/23384, 73818/23497, 74173/23610, 74528/23723, 74883/23836, 75238/23949, 75593/24062, 75948/24175, 76303/24288, 76658/24401, 77013/24514, 77368/24627, 77723/24740, 78078/24853, 78433/24966, 78788/25079, 79143/25192, 79498/25305, 79853/25418, 80208/25531, 80563/25644, 80918/25757, 81273/25870, 81628/25983, 81983/26096, 82338/26209, 82693/26322, 83048/26435, 83403/26548, 83758/26661, 84113/26774, 84468/26887, 84823/27000, 85178/27113, 85533/27226, 85888/27339, 86243/27452, 86598/27565, 86953/27678, 87308/27791, 87663/27904, 88018/28017, 88373/28130, 88728/28243, 89083/28356, 89438/28469, 89793/28582, 90148/28695, 90503/28808, 90858/28921, 91213/29034, 91568/29147, 91923/29260, 92278/29373, 92633/29486, 92988/29599, 93343/29712, 93698/29825, 94053/29938, 94408/30051, 94763/30164, 95118/30277, 95473/30390, 95828/30503, 96183/30616, 96538/30729, 96893/30842, 97248/30955, 97603/31068, 97958/31181, 98313/31294, 98668/31407, 99023/31520, 99378/31633, 99733/31746, 100088/31859, 100443/31972, 100798/32085, 101153/32198, 101508/32311, 101863/32424, 102218/32537, 102573/32650, 102928/32763, 103283/32876, 103638/32989, 103993/33102, 104348/33215, 208341/66317, 312689/99532, 521030/165849, 833719/265381, 1146408/364913, 1980127/630294, 3126535/995207, 4272943/1360120]

Here are the Farey fraction numerators for \( \pi \) (permalink):

7, 10, 13, 16, 19, 22, 25, 47, 69, 91, 113, 135, 157, 179, 201, 223, 245, 267, 289, 311, 333, 355, 688, 1043, 1398, 1753, 2108, 2463, 2818, 3173, 3528, 3883, 4238, 4593, 4948, 5303, 5658, 6013, 6368, 6723, 7078, 7433, 7788, 8143, 8498, 8853, 9208, 9563, 9918, 10273, 10628, 10983, 11338, 11693, 12048, 12403, 12758, 13113, 13468, 13823, 14178, 14533, 14888, 15243, 15598, 15953, 16308, 16663, 17018, 17373, 17728, 18083, 18438, 18793, 19148, 19503, 19858, 20213, 20568, 20923, 21278, 21633, 21988, 22343, 22698, 23053, 23408, 23763, 24118, 24473, 24828, 25183, 25538, 25893, 26248, 26603, 26958, 27313, 27668, 28023, 28378, 28733, 29088, 29443, 29798, 30153, 30508, 30863, 31218, 31573, 31928, 32283, 32638, 32993, 33348, 33703, 34058, 34413, 34768, 35123, 35478, 35833, 36188, 36543, 36898, 37253, 37608, 37963, 38318, 38673, 39028, 39383, 39738, 40093, 40448, 40803, 41158, 41513, 41868, 42223, 42578, 42933, 43288, 43643, 43998, 44353, 44708, 45063, 45418, 45773, 46128, 46483, 46838, 47193, 47548, 47903, 48258, 48613, 48968, 49323, 49678, 50033, 50388, 50743, 51098, 51453, 51808, 52163, 52518, 52873, 53228, 53583, 53938, 54293, 54648, 55003, 55358, 55713, 56068, 56423, 56778, 57133, 57488, 57843, 58198, 58553, 58908, 59263, 59618, 59973, 60328, 60683, 61038, 61393, 61748, 62103, 62458, 62813, 63168, 63523, 63878, 64233, 64588, 64943, 65298, 65653, 66008, 66363, 66718, 67073, 67428, 67783, 68138, 68493, 68848, 69203, 69558, 69913, 70268, 70623, 70978, 71333, 71688, 72043, 72398, 72753, 73108, 73463, 73818, 74173, 74528, 74883, 75238, 75593, 75948, 76303, 76658, 77013, 77368, 77723, 78078, 78433, 78788, 79143, 79498, 79853, 80208, 80563, 80918, 81273, 81628, 81983, 82338, 82693, 83048, 83403, 83758, 84113, 84468, 84823, 85178, 85533, 85888, 86243, 86598, 86953, 87308, 87663, 88018, 88373, 88728, 89083, 89438, 89793, 90148, 90503, 90858, 91213, 91568, 91923, 92278, 92633, 92988, 93343, 93698, 94053, 94408, 94763, 95118, 95473, 95828, 96183, 96538, 96893, 97248, 97603, 97958, 98313, 98668, 99023, 99378, 99733, 100088, 100443, 100798, 101153, 101508, 101863, 102218, 102573, 102928, 103283, 103638, 103993, 104348, 208341, 312689, 521030, 833719, 1146408, 1980127, 3126535, 4272943 (OEIS A097545)

Here are the Farey fraction denominators for \( \pi \) (permalink):

2, 3, 4, 5, 6, 7, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 219, 332, 445, 558, 671, 784, 897, 1010, 1123, 1236, 1349, 1462, 1575, 1688, 1801, 1914, 2027, 2140, 2253, 2366, 2479, 2592, 2705, 2818, 2931, 3044, 3157, 3270, 3383, 3496, 3609, 3722, 3835, 3948, 4061, 4174, 4287, 4400, 4513, 4626, 4739, 4852, 4965, 5078, 5191, 5304, 5417, 5530, 5643, 5756, 5869, 5982, 6095, 6208, 6321, 6434, 6547, 6660, 6773, 6886, 6999, 7112, 7225, 7338, 7451, 7564, 7677, 7790, 7903, 8016, 8129, 8242, 8355, 8468, 8581, 8694, 8807, 8920, 9033, 9146, 9259, 9372, 9485, 9598, 9711, 9824, 9937, 10050, 10163, 10276, 10389, 10502, 10615, 10728, 10841, 10954, 11067, 11180, 11293, 11406, 11519, 11632, 11745, 11858, 11971, 12084, 12197, 12310, 12423, 12536, 12649, 12762, 12875, 12988, 13101, 13214, 13327, 13440, 13553, 13666, 13779, 13892, 14005, 14118, 14231, 14344, 14457, 14570, 14683, 14796, 14909, 15022, 15135, 15248, 15361, 15474, 15587, 15700, 15813, 15926, 16039, 16152, 16265, 16378, 16491, 16604, 16717, 16830, 16943, 17056, 17169, 17282, 17395, 17508, 17621, 17734, 17847, 17960, 18073, 18186, 18299, 18412, 18525, 18638, 18751, 18864, 18977, 19090, 19203, 19316, 19429, 19542, 19655, 19768, 19881, 19994, 20107, 20220, 20333, 20446, 20559, 20672, 20785, 20898, 21011, 21124, 21237, 21350, 21463, 21576, 21689, 21802, 21915, 22028, 22141, 22254, 22367, 22480, 22593, 22706, 22819, 22932, 23045, 23158, 23271, 23384, 23497, 23610, 23723, 23836, 23949, 24062, 24175, 24288, 24401, 24514, 24627, 24740, 24853, 24966, 25079, 25192, 25305, 25418, 25531, 25644, 25757, 25870, 25983, 26096, 26209, 26322, 26435, 26548, 26661, 26774, 26887, 27000, 27113, 27226, 27339, 27452, 27565, 27678, 27791, 27904, 28017, 28130, 28243, 28356, 28469, 28582, 28695, 28808, 28921, 29034, 29147, 29260, 29373, 29486, 29599, 29712, 29825, 29938, 30051, 30164, 30277, 30390, 30503, 30616, 30729, 30842, 30955, 31068, 31181, 31294, 31407, 31520, 31633, 31746, 31859, 31972, 32085, 32198, 32311, 32424, 32537, 32650, 32763, 32876, 32989, 33102, 33215, 66317, 99532, 165849, 265381, 364913, 630294, 995207, 1360120 (OEIS A097546)

The progressive list of approximating Farey fractions for \( \sqrt{2} \) is given by (permalink):

3/2, 4/3, 7/5, 10/7, 17/12, 24/17, 41/29, 58/41, 99/70, 140/99, 239/169, 338/239, 577/408, 816/577, 1393/985, 1970/1393, 3363/2378, 4756/3363, 8119/5741, 11482/8119, 19601/13860, 27720/19601, 47321/33461, 66922/47321, 114243/80782, 161564/114243, 275807/195025, 390050/275807, 665857/470832, 941664/665857, 1607521/1136689

Here are the Farey fraction numerators for \( \sqrt{2} \) (permalink):

3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521 (OEIS A119016)

Here are Farey fraction denominators for \( \sqrt{2} \) (permalink):

2, 3, 5, 7, 12, 17, 29, 41, 70, 99, 169, 239, 408, 577, 985, 1393, 2378, 3363, 5741, 8119, 13860, 19601, 33461, 47321, 80782, 114243, 195025, 275807, 470832, 665857, 1136689 (OEIS A002965)

Other terms that are used in this context are "interleave denominators" and "interleave numerators". The Farey fractions for the golden ratio are the successive ratios of Fibonacci numbers (higher term as numerator and lower term as denominator). Permalink.

Now what about the mathematician to whom these kinds of fractions owe their name. Well, he wasn't really a mathematician but rather a geologist, although he does have an entry in MacTutor biographies of mathematicians. Here is a link. Some details follow:

Born on the 24th of September 1766 in Woburn, Bedfordshire, England

Died on the 6th January 1826 in London, England

Summary: John Farey was an Engish geologist, noted as a mathematician for the Farey sequence which is a listing of the rationals.

Monday, 11 December 2023

Fibonacci Numbers in the Abundancy Index

I've made several posts over the years concerning numbers and their associated abundancy. The abundancy of a number \(n\) is defined as:$$ \frac{\sigma_1(n)}{n} $$The abundancy of a number is sometimes referred to as its abundancy index. The number associated with my diurnal age today, 27280, is a member of OEIS  A349687:


 A349687

Numbers whose numerator and denominator of their abundancy index are both Fibonacci numbers.


The initial members of the sequence are (permalink):

1, 2, 6, 15, 24, 26, 28, 84, 90, 96, 120, 270, 330, 496, 672, 1335, 1488, 1540, 1638, 8128, 24384, 27280, 44109, 68200, 131040, 447040, 523776, 18506880, 22256640, 33550336, 36197280, 38257095, 65688320, 91963648, 95472000, 100651008, 102136320, 176432256, 197308800

The initial Fibonacci numbers are as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657

In the case of 27280 we have:$$ \begin{align} \frac{\sigma_1(27280)}{27280} &= \frac{71424}{27280}\\ &= \frac{144}{55} \end{align} $$We find that two earlier members of the OEIS sequence, 330 and 1540, have this same abundancy as do two later members, 68200 and 447040. I only checked up to one million so there will be many more numbers with the same abundancy as 27280. Numbers with the same abundancy are called friendly numbers. These number properties are base independent.

A variation on the above would be use the set of square numbers instead of the Fibonacci numbers. Up to 40,000, the square numbers are:

1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924, 14161, 14400, 14641, 14884, 15129, 15376, 15625, 15876, 16129, 16384, 16641, 16900, 17161, 17424, 17689, 17956, 18225, 18496, 18769, 19044, 19321, 19600, 19881, 20164, 20449, 20736, 21025, 21316, 21609, 21904, 22201, 22500, 22801, 23104, 23409, 23716, 24025, 24336, 24649, 24964, 25281, 25600, 25921, 26244, 26569, 26896, 27225, 27556, 27889, 28224, 28561, 28900, 29241, 29584, 29929, 30276, 30625, 30976, 31329, 31684, 32041, 32400, 32761, 33124, 33489, 33856, 34225, 34596, 34969, 35344, 35721, 36100, 36481, 36864, 37249, 37636, 38025, 38416, 38809, 39204, 39601, 40000

We find only 18 numbers qualify (permalink): 

1, 40, 81, 135, 216, 224, 400, 819, 1372, 3240, 3744, 4650, 6318, 18144, 21700, 27930, 30240, 32760

Here is the breakdown:

1 --> 1/1 = 1/1
40 --> 90/40 = 9/4
81 --> 121/81 = 121/81
135 --> 240/135 = 16/9
216 --> 600/216 = 25/9
224 --> 504/224 = 9/4
400 --> 961/400 = 961/400
819 --> 1456/819 = 16/9
1372 --> 2800/1372 = 100/49
3240 --> 10890/3240 = 121/36
3744 --> 11466/3744 = 49/16
4650 --> 11904/4650 = 64/25
6318 --> 15288/6318 = 196/81
18144 --> 60984/18144 = 121/36
21700 --> 55552/21700 = 64/25
27930 --> 82080/27930 = 144/49
30240 --> 120960/30240 = 4/1
32760 --> 131040/32760 = 4/1

These numbers belong to OEIS A069070.