mdbtxt1
mdbtxt2
Proceed to Safety

Sequence A019296: Values of N for which exp(pi*sqrt(N)) is nearly an integer    

This sequence, Sloane's A019296, gives numbers which share the curious property of the number 163. The sequence starts:

-1, 0, 6, 17, 18, 22, 25, 37, 43, 58, 59, 67, 74, 103, 148, 149, 163, 164, 177, 205, 223, 226, 232, 267, 268, 326, 359, 386, 522, 566, 630, 638, 652, 719, 790, 792, 928, 940, 986, 1005, 1014, 1169, 1194, 1213, 1245, 1257, 1293, 1326, 1332, 1353, 1441, 1467, 1481, 1519, 1556, 1750, 1823, 1825, 1835, 1850, 1872, 1930, 1951, 1960, 1961, ... (more terms at the end of this page)

The sequence is definied with a somewhat arbitrary definition of "nearly an integer" — defined as being within 0.01. This means that the value of eπ sqrt(N) will have two 0's or 9's after the decimal point. The odds of this happening at random are one in 50, and as you can see the sequence has only a few more than the expected number of terms based on random occurrence (for example, 26 in the range 1000..1999, compared to the expected 20).

If we instead define "nearly" as "within 0.001", the odds are 1 in 500 and the sequence starts:

-1, 0, 25, 37, 43, 58, 67, 74, 148, 163, 232, 268, 522, 652, 719, 1169, 1194, 1245, 1332, 1467, 1519, 1850, 1872, 2086, 2608, 3368, 4075, 5650, 5773, 5774, 5868, 6632, 7260, 7685, 7802, 7942, 8325, 9058, 9728, 10032, 10153, 10210, 11076, 11682, 12158, 12314, 13049, 13097, 13574, 14370, 15696, 16170, 17908, 18505, 18736, 19183, 19396, 19571, (no other terms less than 20000) ...

and if the definition is "within 0.0001", the odds are 1 in 5000 and the sequence becomes:

-1, 0, 37, 58, 67, 163, 232, 652, 719, 1169, 1467, 2608, 4075, 5773, 5868, 14370, 19183, (no other terms less than 20000) ...

In each of these cases you can see that there are some terms at the beginning that seem to stand out statistically, but thereafter there are not many more than the expected number of terms based on random occurrence. Therefore, it seems to make sense to define "nearly an integer" in some way that becomes more strict as N increases. Here is what we get if we define "nearly" as "within 1/N":

-1, 0, 2, 3, 5, 6, 7, 13, 17, 18, 22, 25, 27, 28, 37, 43, 58, 59, 67, 74, 103, 148, 163, 164, 177, 205, 223, 232, 268, 386, 522, 652, 719, 1169, 1194, 1245, 1467, 1519, 1850, 2086, 2608, 3368, 4075, 5773, 5868, 22905, 28201, 33563, 54295, 55003, 66499, 81194, 95041, 160874, (no other terms less than 300000) ...

Here is a bc program for generating the sequence. You should invoke bc as bc -l to define the exponential and square root functions.

define trunc(x) { auto sc,t;    sc=scale scale=0 t=x/1 scale=sc    return(t) }    define fract(x) { return(x - trunc(x)) }    # Note: the scale should be # # pi * sqrt(N) / ln(10) + D + E # # where: # # N is the limit of the loop below (in this case, N=20000) # D is the number of '0' or '9' digits we want after the decimal point # E is additional precision to ensure accuracy in calculating the sequence. scale = 200    # compute pi to the needed precision. We use one of the the Ramanujan # series related to the elliptic modular function, which gives 10^14 # greater accuracy per iteration ka=545140134; kb = 13591409; kc = 640320; kd = kc^3; ke=kc/12 pi = 0; n = 0; n6=0; n6f=1; anb = kb; n3=0; nf3=1; f1=1; n3f=1; dn=1 l = scale while(l > 0) { pi += f1 * n6f * anb / (n3f * nf3 * dn);    n += 1; n6 += 6; anb += ka; n3 += 3; dn*=kd; f1 *= -1; n6f *= n6 * (n6-1) * (n6-2) * (n6-3) * (n6-4) * (n6-5); n3f *= n3 * (n3-1) * (n3-2); nf3 = nf3 * n^3; l -= 14 } pi = ke * sqrt(kc) / pi    for (n=1; n<20000; n++) { t = e(pi * sqrt(n)); f = fract(t); if (f > 0.5) { f = 1.0 - f; } if (f < 0.01) { # or substitute "1/n" print n, " ", f, "\n" } }

Here are more terms to A019296:

-1, 0, 6, 17, 18, 22, 25, 37, 43, 58, 59, 67, 74, 103, 148, 149, 163, 164, 177, 205, 223, 226, 232, 267, 268, 326, 359, 386, 522, 566, 630, 638, 652, 719, 790, 792, 928, 940, 986, 1005, 1014, 1169, 1194, 1213, 1245, 1257, 1293, 1326, 1332, 1353, 1441, 1467, 1481, 1519, 1556, 1750, 1823, 1825, 1835, 1850, 1872, 1930, 1951, 1960, 1961, 2061, 2086, 2160, 2196, 2208, 2278, 2309, 2339, 2347, 2357, 2403, 2438, 2498, 2511, 2527, 2551, 2554, 2608, 2653, 2683, 2795, 2829, 3086, 3105, 3108, 3157, 3353, 3368, 3377, 3517, 3573, 3597, 3600, 3646, 3653, 3656, 3738, 3762, 3790, 3811, 3829, 3843, 3911, 3913, 3927, 3980, 4075, 4109, 4127, 4131, 4144, 4218, 4243, 4266, 4538, 4581, 4600, 4608, 4622, 4649, 4690, 4762, 4795, 4851, 4863, 4866, 5005, 5026, 5083, 5237, 5240, 5279, 5299, 5436, 5480, 5509, 5531, 5603, 5608, 5650, 5683, 5773, 5774, 5787, 5790, 5808, 5809, 5840, 5868, 5913, 5995, 6055, 6203, 6297, 6319, 6406, 6429, 6436, 6481, 6570, 6597, 6609, 6610, 6632, 6634, 6668, 6845, 6972, 7032, 7116, 7162, 7165, 7179, 7221, 7260, 7293, 7359, 7384, 7433, 7461, 7482, 7601, 7608, 7609, 7638, 7661, 7685, 7688, 7733, 7802, 7810, 7834, 7910, 7942, 7987, 7998, 8011, 8031, 8039, 8174, 8230, 8325, 8370, 8449, 8526, 8531, 8537, 8581, 8761, 8794, 8808, 8826, 9040, 9042, 9058, 9069, 9166, 9485, 9519, 9569, 9601, 9648, 9658, 9707, 9718, 9728, 9777, 9799, 9850, 9922, 9933, 10032, 10061, 10063, 10082, 10093, 10153, 10205, 10210, 10235, 10379, 10497, 10527, 10535, 10677, 10682, 10694, 10753, 10797, 10798, 10932, 11015, 11048, 11076, 11101, 11227, 11278, 11295, 11427, 11506, 11591, 11682, 11749, 11978, 11982, 12055, 12083, 12093, 12155, 12158, 12261, 12314, 12352, 12374, 12396, 12412, 12524, 12554, 12561, 12568, 12618, 12841, 12858, 12909, 12920, 13028, 13049, 13097, 13172, 13199, 13273, 13308, 13334, 13346, 13369, 13482, 13574, 13626, 13630, 13640, 13670, 13722, 13747, 13814, 13915, 13925, 13985, 14076, 14100, 14109, 14221, 14277, 14305, 14319, 14328, 14351, 14370, 14493, 14499, 14520, 14535, 14551, 14723, 14724, 14770, 14902, 14915, 14922, 14955, 14957, 14981, 14988, 15018, 15024, 15147, 15181, 15222, 15256, 15413, 15417, 15420, 15623, 15696, 15722, 15869, 15890, 15933, 15953, 16132, 16135, 16149, 16158, 16159, 16170, 16174, 16185, 16233, 16358, 16374, 16479, 16539, 16544, 16719, 16732, 16761, 16788, 16877, 16883, 16917, 16934, 16946, 16976, 17064, 17132, 17146, 17154, 17158, 17254, 17262, 17287, 17347, 17363, 17409, 17531, 17578, 17627, 17631, 17685, 17810, 17894, 17908, 17973, 18019, 18084, 18126, 18213, 18221, 18236, 18328, 18417, 18429, 18494, 18505, 18524, 18535, 18568, 18650, 18711, 18726, 18736, 18823, 18838, 18955, 19019, 19050, 19056, 19183, 19291, 19337, 19355, 19396, 19410, 19542, 19562, 19571, 19609, 19870, ...


Some other sequences are discussed here.



Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2014 Dec 07. s.27