1
$\begingroup$

I've encountered this phenomenon a number of times--and can provide specific examples if requested. For example, I have a 75-long sequence of rational numbers for which the FindSequenceFunction fails to provide a rule. Contrastingly, if I take the first 50 members of the sequence, the command does furnish a rule, which succeeds in reproducing the last 25 members of the sequence. So, to be totally thorough, it seems that if the command fails, one should undertake the time-consuming activity of checking subsequences of increasing/decreasing length. Only if the command fails for all such subsequences, then one can accept the conclusion that there is no apparent rule. Is there some specific length cut-off rule that Mathematica applies? Here--as suggested by Bob Hanlon--is the 75-long sequence in question. So, if his timing cut-off explanation is correct, is there any way to modify the timing cut-off rule?

{8/33, 26/323, 2999/103385, 44482/4091349, 89514/21460999, 179808469/
  110638410169, 191151001/298529164591, 1331199762/5232880523393, 
  74195568677/729345064647247, 730710456538/17868447453498669, 
  1763088530160992/106791887427691356141, 1884480400168307/
  281722067682582271371, 73311677645345281/26967836824137636644415, 
  456910178894124999/412488768387191176401281, 235858699169080988497/
  521381168536146869542270855, 14201351814342435842/
  76716816738683278836116705, 2178302469068100802897/
  28705960875463688094521233705, 429806807892246603906497/
  13795565957979731569010551915445, 5077791241958454582179372/
  396408873146550339863515593534955, 16915600222887935686875648022/
  3207808012208655726115716096231777847, 
  220072366758124168202760252682/
  101260648196413392173211856927505491249, 36478744649401772516501588/
  40683265647413978374130918813782841, 100873536200588992843564356904/
  272420212154638167052379553997029381313, 
  50868593297571410174924223701080373/
  332366700852321443789422937622477328443605861, 
  234749641791186164106838232918504/
  3707899991729973882890135443497124736181389, 
  3658766751525682214931857205460217/
  139601253828763538992124780933194295003619047, 
  7751132431571389077664649208803390201/
  713922711163771069411457951075078375491144558711, 
  1036767506025579644642168308123737642479/
  230366844136199925641647569249414039437097176944953, 
  5802297075903128151479030066963998381/
  3108359450458298884771594841885865337640896355611, 
  4986795098594104248611638362169017083/
  6437284917664140259622818577919562534636600597933, 
  1779262884821633715492819208764929946535919/
  5531513868754372076112070644276234649075488437599641369, 
  6410605583723568608339707829501538109888638/
  47974716561860127743728451233776222666394343348630654863, 
  67486972876304998119958347845372405417993/
  1215184897735558677895119048928392957368813176164840453, 
  10108651897613196111139625117311363976775529/
  437759883677357983033458920832928318125241077634278903879, 
  16893572462161452090438435924483379095551365184/
  1758759461378453017701928103447444676632452566697670837323269, 
  69792039834426846192333238347065829501936768075643/
  17460826149566003063425383073801536710162275940729158743893642763, 
  6562665684060256928064005413426417965527523830579/
  3944153906465757660242663247744319687717127133714341757940980239, 
  423621636136936099414536534786122915329220927786698/
  611385889653052950000286647453988049049302759674746263659389137727, 
  112836649766195893712883861507429097874360915882434628/
  39093798086583433417035496456749921658243978650498464199064982601945\
3, 2469104765661818826357795748344919918838020451690302994/
  20529643241342147284526501963415880186517451121589728310712410401284\
021, 273234233202269238895216741538172875078179325648406919116/
  54504401959865037694164834072346055239047120670704799741405422210987\
91049, 237572695485036827027842869079327170508804062464640282842/
  11366429831201287176768277117675023110067354367919013524045273000101\
737173, 1513406429160163183067630905213301710465861979451875132522/
  17361865955331721091219496755820213289178178776707676488873738221114\
4917359, 24015844699643455713678450999840521048179907728634703151756/
  66044927233362835042358224531190652061236991577507146302592400985331\
00641589, 
  234295135631403778896477870508995924739356061570136078973839888/
   1544180647001996059640078829426028394685339052457332972114925026354\
28401448489813, 
  20283311909093538693494220127587254955876140039250871626279004184/
   3203052308845810868297928003416351008603116267356943274364188314183\
5394813222994749, 
  7674162014901917726537932116865512909291406576551328397046176856/
   2903005726942520074922753127299384376977622417179875137701458116859\
6049368987123841, 
  94690165605482531317925879428708453600918510467044846981979819741/
   8578652648182939165449633595837219514004029975129682670191812458100\
04058612665408541, 
  74228199976863811380755765181103511603220418505530775649561987369792\
2/16102368177931016000604389365298154821226053794522504987750812030546\
303860462622639468467, 
  15644209801006165966614379673923067197820002213040052573521720666049\
4/81244506782483083764424573238460862040361990328278361869440396392746\
26518069614456111997, 
  54508615141031158027287162454904665119075334148200203336974401449250\
459/677550076156312589151606847313466421029568706768017073431505419128\
5227373100355636335460117, 
  57298151398852165521498313842152765925302311161031467997423588454466\
11/1704402855350628845479941739022307947335817564963935165047026822493\
670450726897758102240653, 
  15448341828485371723604907763733894798396999714411747749815784481035\
73827/1099490388325602979491260965419207631149978994675615122100825413\
287691329591468464503474756637, 
  14385499644470087221892059537063202666733970301905272321850948727986\
7076929/24492765297582696960784736917897289995088061487273849808210740\
2360028650891934769122038759022607, 
  21147305933613335975703724335208049162725414743261318438707033670322\
91239/8611906291558613638586649800147726185841209509249081342862553775\
852392623120673568795731901097, 
  14615656974740672346218082529732663691850335975882207460482126160194\
74979/1423392226824376200799039744416107859202834924822474275363336039\
5103212733169777975724696346917, 
  22818336988249035656534678070253095937092355453761495618797584340543\
88759353027/
   5313556211244822874230576764031644946866140195246164289385437274534\
4155017675385551493728176913537421, 
  45475190386894703927321163053745931297738574246576218449276061029877\
90196453/2531664726627963632966188114948646304667731511735495235440408\
00591757243381243218278753467363146339, 
  84054369879675844974934677741726105090465425461757594304975213092696\
71908251/1118561448341265560270437703543079199403408482266929412518364\
367217988536837236035739912572518720573, 
  21955654046493313002896634958013006674522479333545761029769242176754\
63818765245177/
   6983182535790998199080637074428672543906480474479760371415725881623\
65588828704657277528396814639198437631, 
  44067457226898522027770363554464370585269408680749430046819954134674\
929499784597093/
   3349454010286892133471837995127191356686260920770224027739264923548\
2619782429667798518616809613334632418579, 
  21841232679277943202253146599100069364571950358205265514000908200309\
5103043544620061603/
   3966665740270629934397159248023399730237078388240978321287163685790\
61112288738688196578104436637440362534482309, 
  11409689564245096955310683194320211571600968805189164734264780598727\
28020777433652321/
   4950623795181764306378355978019101062489065090766076039946122490998\
318028074236870721119332804275135560701015, 
  36771078890632459718859906629883387779485082829466124036783284420048\
77441571129859942/
   3811334026755339486628517085323008196567952304603877757541811168918\
4440045899986519603896774691085286460268963, 
  15056452643437982632345115687321173329936655145929814230187482071440\
949676018726905704748031/
   3727574861776103173507020486272410642538946581966828247371570741199\
42155221611443648253609018634666134859559598131515, 
  45169892794341895770842483694396664502862499203348008500974578764958\
32638007432252809348731617471/
   2670766516590101068963588047280235767435762349318095659384398424866\
77485933660721100386303184370483583607516659459390027765, 
  10210118960170926190310107165158089077772959997803727125748756572211\
0524363193945756326384093576/
   1441625237416103143169952199923608880982540854631519738916363400438\
9075139689996288179487526080974538219020487370062803365, 
  43304283224172493326307799406512391195721629930415141316608966694148\
29642158974354016914226534561/
   1459957173364663992429955081754600137724263717999705834551705732099\
078640635851477843215444792295999128225902084026535792835, 
  14508936359063149080780883537181149078655785995285797377380426722104\
434728087984279663716452484482943/
   1167849437018598754608973882541235252202338024578161301244374873527\
7228164135796822415916251119635147060399985868857214356539945, 
  48304748422100741249066840498803221406951302310119608885288328066800\
73258461411018544275580710162/
   9281939867573373170833062451163622376474231205724421024748516560104\
464246463067900060156000923887593568376680246564784680111, 
  23520779384511743636145308774132144300972249140737148050324180131869\
583324431800097056898701352136/
   1078835305919593701331252668504099715560693430304690902712573482149\
84674602333035100699190240246496784261951906472367743249159, 
  87323410789451382253920173940307489286585212883680237113479746396109\
0922272781353100772178001769/
   9559753864203405281725685140123295090223170379293374052586137654154\
105141910597308264589621873811466546673768385105508807121, 
  79035502431495289706996362052889812583373709654824426894793032502308\
244673162271250920957647380/
   2064952280660357226843985271923235276990862097379305616390053107230\
870883877093466309306721333740993219599434371389037804133, 
  90445793185153797800852899676114761492502755265500783536135548655294\
5476658021761049529147712809897/
   5639079985374152293770378927726325333457666729510004720504670634482\
3255593534225439032499478751226896469319518453287523933405033, 
  23553060716641396843799712649572408615393589819050441982985896275120\
20426151676970407951054161695929167/
   3503972336613451404073290700466364645648155714253314102459423921321\
48806886447027343007366165332219929193819666595827008264726888405};
$\endgroup$
  • 1
    $\begingroup$ I recall seeing this happen; however, your question would be easier to address if you include a concrete example. The documentation states "FindSequenceFunction[list] by default uses earlier elements in list to find candidate simple functions, then validates the functions by looking at later elements." My initial guess is that for the longer sequences it times out before finding a valid "candidate simple function." $\endgroup$ – Bob Hanlon Nov 10 '16 at 17:57
  • $\begingroup$ OK--that seems like a reasonable explanation by Bob Hanlon. I will try to edit my question by inserting the 75-long sequence in question. $\endgroup$ – Paul B. Slater Nov 10 '16 at 21:46
3
$\begingroup$
seq = {8/33, 26/323, 2999/103385, 44482/4091349, 89514/21460999, 
   179808469/110638410169, 191151001/298529164591, 1331199762/5232880523393, 
   74195568677/729345064647247, 730710456538/17868447453498669, 
   1763088530160992/106791887427691356141, 
   1884480400168307/281722067682582271371, 
   73311677645345281/26967836824137636644415, 
   456910178894124999/412488768387191176401281, 
   235858699169080988497/521381168536146869542270855, 
   14201351814342435842/76716816738683278836116705, 
   2178302469068100802897/28705960875463688094521233705, 
   429806807892246603906497/13795565957979731569010551915445, 
   5077791241958454582179372/396408873146550339863515593534955, 
   16915600222887935686875648022/3207808012208655726115716096231777847, 
   220072366758124168202760252682/101260648196413392173211856927505491249, 
   36478744649401772516501588/40683265647413978374130918813782841, 
   100873536200588992843564356904/272420212154638167052379553997029381313, 
   50868593297571410174924223701080373/
    332366700852321443789422937622477328443605861, 
   234749641791186164106838232918504/
    3707899991729973882890135443497124736181389, 
   3658766751525682214931857205460217/
    139601253828763538992124780933194295003619047, 
   7751132431571389077664649208803390201/
    713922711163771069411457951075078375491144558711, 
   1036767506025579644642168308123737642479/
    230366844136199925641647569249414039437097176944953, 
   5802297075903128151479030066963998381/
    3108359450458298884771594841885865337640896355611, 
   4986795098594104248611638362169017083/
    6437284917664140259622818577919562534636600597933, 
   1779262884821633715492819208764929946535919/
    5531513868754372076112070644276234649075488437599641369, 
   6410605583723568608339707829501538109888638/
    47974716561860127743728451233776222666394343348630654863, 
   67486972876304998119958347845372405417993/
    1215184897735558677895119048928392957368813176164840453, 
   10108651897613196111139625117311363976775529/
    437759883677357983033458920832928318125241077634278903879, 
   16893572462161452090438435924483379095551365184/
    1758759461378453017701928103447444676632452566697670837323269, 
   69792039834426846192333238347065829501936768075643/
    17460826149566003063425383073801536710162275940729158743893642763, 
   6562665684060256928064005413426417965527523830579/
    3944153906465757660242663247744319687717127133714341757940980239, 
   423621636136936099414536534786122915329220927786698/
    611385889653052950000286647453988049049302759674746263659389137727, 
   112836649766195893712883861507429097874360915882434628/
     39093798086583433417035496456749921658243978650498464199064982601945 3, 
   2469104765661818826357795748344919918838020451690302994/
     20529643241342147284526501963415880186517451121589728310712410401284 021,
    273234233202269238895216741538172875078179325648406919116/
     54504401959865037694164834072346055239047120670704799741405422210987 \
91049, 237572695485036827027842869079327170508804062464640282842/
     11366429831201287176768277117675023110067354367919013524045273000101 \
737173, 1513406429160163183067630905213301710465861979451875132522/
     17361865955331721091219496755820213289178178776707676488873738221114 \
4917359, 24015844699643455713678450999840521048179907728634703151756/
     66044927233362835042358224531190652061236991577507146302592400985331 \
00641589, 234295135631403778896477870508995924739356061570136078973839888/
     1544180647001996059640078829426028394685339052457332972114925026354 \
28401448489813, 
   20283311909093538693494220127587254955876140039250871626279004184/
     3203052308845810868297928003416351008603116267356943274364188314183 \
5394813222994749, 
   7674162014901917726537932116865512909291406576551328397046176856/
     2903005726942520074922753127299384376977622417179875137701458116859 \
6049368987123841, 
   94690165605482531317925879428708453600918510467044846981979819741/
     8578652648182939165449633595837219514004029975129682670191812458100 \
04058612665408541, 
   74228199976863811380755765181103511603220418505530775649561987369792 2/
     16102368177931016000604389365298154821226053794522504987750812030546 \
303860462622639468467, 
   15644209801006165966614379673923067197820002213040052573521720666049 4/
     81244506782483083764424573238460862040361990328278361869440396392746 \
26518069614456111997, 
   54508615141031158027287162454904665119075334148200203336974401449250 459/
     677550076156312589151606847313466421029568706768017073431505419128 \
5227373100355636335460117, 
   57298151398852165521498313842152765925302311161031467997423588454466 11/
     1704402855350628845479941739022307947335817564963935165047026822493 \
670450726897758102240653, 
   15448341828485371723604907763733894798396999714411747749815784481035 73827/
     1099490388325602979491260965419207631149978994675615122100825413 \
287691329591468464503474756637, 
   14385499644470087221892059537063202666733970301905272321850948727986 \
7076929/24492765297582696960784736917897289995088061487273849808210740 \
2360028650891934769122038759022607, 
   21147305933613335975703724335208049162725414743261318438707033670322 91239/
     8611906291558613638586649800147726185841209509249081342862553775 \
852392623120673568795731901097, 
   14615656974740672346218082529732663691850335975882207460482126160194 74979/
     1423392226824376200799039744416107859202834924822474275363336039 \
5103212733169777975724696346917, 
   22818336988249035656534678070253095937092355453761495618797584340543 \
88759353027/
     5313556211244822874230576764031644946866140195246164289385437274534 \
4155017675385551493728176913537421, 
   45475190386894703927321163053745931297738574246576218449276061029877 \
90196453/2531664726627963632966188114948646304667731511735495235440408 \
00591757243381243218278753467363146339, 
   84054369879675844974934677741726105090465425461757594304975213092696 \
71908251/1118561448341265560270437703543079199403408482266929412518364 \
367217988536837236035739912572518720573, 
   21955654046493313002896634958013006674522479333545761029769242176754 \
63818765245177/
     6983182535790998199080637074428672543906480474479760371415725881623 \
65588828704657277528396814639198437631, 
   44067457226898522027770363554464370585269408680749430046819954134674 \
929499784597093/
     3349454010286892133471837995127191356686260920770224027739264923548 \
2619782429667798518616809613334632418579, 
   21841232679277943202253146599100069364571950358205265514000908200309 \
5103043544620061603/
     3966665740270629934397159248023399730237078388240978321287163685790 \
61112288738688196578104436637440362534482309, 
   11409689564245096955310683194320211571600968805189164734264780598727 \
28020777433652321/
     4950623795181764306378355978019101062489065090766076039946122490998 \
318028074236870721119332804275135560701015, 
   36771078890632459718859906629883387779485082829466124036783284420048 \
77441571129859942/
     3811334026755339486628517085323008196567952304603877757541811168918 \
4440045899986519603896774691085286460268963, 
   15056452643437982632345115687321173329936655145929814230187482071440 \
949676018726905704748031/
     3727574861776103173507020486272410642538946581966828247371570741199 \
42155221611443648253609018634666134859559598131515, 
   45169892794341895770842483694396664502862499203348008500974578764958 \
32638007432252809348731617471/
     2670766516590101068963588047280235767435762349318095659384398424866 \
77485933660721100386303184370483583607516659459390027765, 
   10210118960170926190310107165158089077772959997803727125748756572211 \
0524363193945756326384093576/
     1441625237416103143169952199923608880982540854631519738916363400438 \
9075139689996288179487526080974538219020487370062803365, 
   43304283224172493326307799406512391195721629930415141316608966694148 \
29642158974354016914226534561/
     1459957173364663992429955081754600137724263717999705834551705732099 \
078640635851477843215444792295999128225902084026535792835, 
   14508936359063149080780883537181149078655785995285797377380426722104 \
434728087984279663716452484482943/
     1167849437018598754608973882541235252202338024578161301244374873527 \
7228164135796822415916251119635147060399985868857214356539945, 
   48304748422100741249066840498803221406951302310119608885288328066800 \
73258461411018544275580710162/
     9281939867573373170833062451163622376474231205724421024748516560104 \
464246463067900060156000923887593568376680246564784680111, 
   23520779384511743636145308774132144300972249140737148050324180131869 \
583324431800097056898701352136/
     1078835305919593701331252668504099715560693430304690902712573482149 \
84674602333035100699190240246496784261951906472367743249159, 
   87323410789451382253920173940307489286585212883680237113479746396109 \
0922272781353100772178001769/
     9559753864203405281725685140123295090223170379293374052586137654154 \
105141910597308264589621873811466546673768385105508807121, 
   79035502431495289706996362052889812583373709654824426894793032502308 \
244673162271250920957647380/
     2064952280660357226843985271923235276990862097379305616390053107230 \
870883877093466309306721333740993219599434371389037804133, 
   90445793185153797800852899676114761492502755265500783536135548655294 \
5476658021761049529147712809897/
     5639079985374152293770378927726325333457666729510004720504670634482 \
3255593534225439032499478751226896469319518453287523933405033, 
   23553060716641396843799712649572408615393589819050441982985896275120 \
20426151676970407951054161695929167/
     3503972336613451404073290700466364645648155714253314102459423921321 \
48806886447027343007366165332219929193819666595827008264726888405};

Length[seq]

(*  75  *)

The sequence spans an incredible range

mm = MinMax[seq // N]

(*  {6.92887*10^-16, 6.70123*10^99}  *)

ListLogPlot[seq,
 Frame -> True,
 Axes -> False,
 PlotRange -> All]

enter image description here

There is a major break at about n = 39

Using the first 30 terms in FindSequenceFunction

AbsoluteTiming[fsf30 = FindSequenceFunction[seq[[;; 30]], n];]

(*  {294.22, Null}  *)

It took almost five minutes and the resulting "simple function" has an extremely large LeafCount

LeafCount@fsf30

(*  10011  *)

fsf30s[n_] = fsf30 // Simplify;

Simplify helps a lot but still leaves a very complicated function

LeafCount@fsf30s[n]

(*  1566  *)

Count[fsf30s[n], #, Infinity] & /@ {_Gamma, _HypergeometricPFQ}

(*  {89, 14}  *)

Checking if the function tracks the sequence

$MaxExtraPrecision = 500;

With[{max = 45},
 (Equal @@@
   Transpose[{
     (Table[fsf30s[n] // N[#, 100] &, {n, max}]),
     (seq[[;; max]] // N)}])]

(*  {True, True, True, True, True, True, True, True, True, True, True, True, \
True, True, True, True, True, True, True, True, True, True, True, True, True, \
True, True, True, True, True, True, True, True, True, True, True, True, True, \
False, False, False, False, False, False, False}  *)

Even with very high precision {100) the function does not align with the sequence for n = 39 and higher, i.e., the function based on the first thirty terms cannot see the break in the sequence.

Using all 75 terms of the sequence

AbsoluteTiming[
 TimeConstrained[
  fsf30 = FindSequenceFunction[seq, n];,
  Infinity]]

(*  {201.327, Null}  *)

fsf30 // Head

(*  FindSequenceFunction  *)

With 75 terms FindSequenceFunction returned unevaluated. It seems unlikely that "a simple function" can be found to handle the break in the sequence. You might want to consider building a Piecewise function by breaking the sequence into segments.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.