All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Does it continue? 8: Prime together (Posted on 2017-09-30) Difficulty: 3 of 5
Before trying each problem "note your opinion as to whether the observed pattern is known to continue, known not to continue, or not known at all."

Part A: Make a table of n4+1 and 17*2n-1. The odd prime values of each are bold.

n    n4+1    17*2n-1
0       1        16
1       2        33
2      17        67
3      82       135
4     257       271
5     626       543
6    1297      1087
7    2402      2175
8    4097      4351
9    6562      8703
10  10001     17407
11  14642     34815
12  20737     69631
13  28562    139263
14  38417    278527
15  50626    557055
16  65537   1114111
17  83522   2228223
18 104977   4456447
19 130322   8912895
20 160001  17825791
21 194482  35651583
22 234257  71303167

Part B: Same but with new formulas.

n   21*2n-1  7*4n+1
0       20            8
1       41           29
2       83          113
3      167          449
4      335         1793
5      671         7169
6     1343        28763
7     2687       114689
8     5375       458763
9    10751      1835009
10   21503      7340033
11   43007     29360129
12   86015    117440513 
13  172031    469762049
14  344063   1879048193
15  688127   7516192769
16 1376255  30064771073
17 2752511 120259084289

No Solution Yet Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
Seeing no reason why primes should accompany primes, I'd say neither continues. I'd also suspect the parameters in the formulae were specifically chosen to get early matches on primes.

The computer says:

Each line shows n, n^4+1, 17*2^n-1

If the first formula results in a prime a * is shown.

If the second formula results in a prime ** is shown.

n=24 is the first instance where only one is a prime, the first one, 331777 (while 285212671=149*1914179); and n=36 is the first instance where only the second formula results in a prime,  1168231104511 (while 1679617=17*98801).

 2   17   67  *  **  
 3   82   135  
 4   257   271  *  **  
 5   626   543  
 6   1297   1087  *  **  
 7   2402   2175  
 8   4097   4351  
 9   6562   8703  
 10   10001   17407  
 11   14642   34815  
 12   20737   69631  
 13   28562   139263  
 14   38417   278527  
 15   50626   557055  
 16   65537   1114111  *  **  
 17   83522   2228223  
 18   104977   4456447  
 19   130322   8912895  
 20   160001   17825791  *  **  
 21   194482   35651583  
 22   234257   71303167  
 23   279842   142606335  
 24   331777   285212671  *  
 25   390626   570425343  
 26   456977   1140850687  
 27   531442   2281701375  
 28   614657   4563402751  *  
 29   707282   9126805503  
 30   810001   18253611007  
 31   923522   36507222015  
 32   1048577   73014444031  
 33   1185922   146028888063  
 34   1336337   292057776127  *  
 35   1500626   584115552255  
 36   1679617   1168231104511  **  
 37   1874162   2336462209023  
 38   2085137   4672924418047  
 39   2313442   9345848836095  
 40   2560001   18691697672191  
 41   2825762   37383395344383  
 42   3111697   74766790688767  
 43   3418802   149533581377535  
 44   3748097   299067162755071  
 45   4100626   598134325510143  
 46   4477457   1196268651020287  *  
 47   4879682   2392537302040575  
 48   5308417   4785074604081151  *  
 49   5764802   9570149208162303  
 50   6250001   19140298416324607  
 51   6765202   38280596832649215  
 52   7311617   76561193665298431  
 53   7890482   153122387330596863  
 54   8503057   306244774661193727  *  **  
 55   9150626   612489549322387455  
 56   9834497   1224979098644774911  *  
 57   10556002   2449958197289549823  
 58   11316497   4899916394579099647  
 59   12117362   9799832789158199295  
 60   12960001   19599665578316398591  **  
 61   13845842   39199331156632797183  
 62   14776337   78398662313265594367  
 63   15752962   156797324626531188735  
 64   16777217   313594649253062377471  
 65   17850626   627189298506124754943  
 66   18974737   1254378597012249509887  
 67   20151122   2508757194024499019775  
 68   21381377   5017514388048998039551  
 69   22667122   10035028776097996079103  
 70   24010001   20070057552195992158207  
 71   25411682   40140115104391984316415  
 72   26873857   80280230208783968632831  
 73   28398242   160560460417567937265663  
 74   29986577   321120920835135874531327  *  
 75   31640626   642241841670271749062655  
 76   33362177   1284483683340543498125311  
 77   35153042   2568967366681086996250623  
 78   37015057   5137934733362173992501247  
 79   38950082   10275869466724347985002495  
 80   40960001   20551738933448695970004991  *  
 81   43046722   41103477866897391940009983  
 82   45212177   82206955733794783880019967  *  
 83   47458322   164413911467589567760039935  
 84   49787137   328827822935179135520079871  
 85   52200626   657655645870358271040159743  
 86   54700817   1315311291740716542080319487  
 87   57289762   2630622583481433084160638975  
 88   59969537   5261245166962866168321277951  *  
 89   62742242   10522490333925732336642555903  
 90   65610001   21044980667851464673285111807  *  
 91   68574962   42089961335702929346570223615  
 92   71639297   84179922671405858693140447231  
 93   74805202   168359845342811717386280894463  
 94   78074897   336719690685623434772561788927  
 95   81450626   673439381371246869545123577855  
 96   84934657   1346878762742493739090247155711  **  
 97   88529282   2693757525484987478180494311423  
 98   92236817   5387515050969974956360988622847  
 99   96059602   10775030101939949912721977245695  
 100  100000001   21550060203879899825443954491391  
 
 Part B:
 
 n=18 is the first instance where the first formula results in a prime (5505023) while the second does not (481036337153=166609*2887217).
 
  n=25 is the first instance where the second formula results in a prime (7881299347898369) while the first does not (704643071=11*3331*19231).
 
 1   41   29  *  **  
 2   83   113  *  **  
 3   167   449  *  **  
 4   335   1793  
 5   671   7169  
 6   1343   28673  
 7   2687   114689  *  **  
 8   5375   458753  
 9   10751   1835009  
 10   21503   7340033  *  **  
 11   43007   29360129  
 12   86015   117440513  
 13   172031   469762049  *  **  
 14   344063   1879048193  
 15   688127   7516192769  
 16   1376255   30064771073  
 17   2752511   120259084289  
 18   5505023   481036337153  *  
 19   11010047   1924145348609  
 20   22020095   7696581394433  
 21   44040191   30786325577729  
 22   88080383   123145302310913  
 23   176160767   492581209243649  
 24   352321535   1970324836974593  
 25   704643071   7881299347898369  **  
 26   1409286143   31525197391593473  **  
 27   2818572287   126100789566373889  *  
 28   5637144575   504403158265495553  
 29   11274289151   2017612633061982209  
 30   22548578303   8070450532247928833  
 31   45097156607   32281802128991715329  
 32   90194313215   129127208515966861313  
 33   180388626431   516508834063867445249  
 34   360777252863   2066035336255469780993  
 35   721554505727   8264141345021879123969  
 36   1443109011455   33056565380087516495873  
 37   2886218022911   132226261520350065983489  *  
 38   5772436045823   528905046081400263933953  
 39   11544872091647   2115620184325601055735809  
 40   23089744183295   8462480737302404222943233  
 41   46179488366591   33849922949209616891772929  
 42   92358976733183   135399691796838467567091713  
 43   184717953466367   541598767187353870268366849  
 44   369435906932735   2166395068749415481073467393  
 45   738871813865471   8665580274997661924293869569  
 46   1477743627730943   34662321099990647697175478273  **  
 47   2955487255461887   138649284399962590788701913089  
 48   5910974510923775   554597137599850363154807652353  
 49   11821949021847551   2218388550399401452619230609409  
 50   23643898043695103   8873554201597605810476922437633  
 51   47287796087390207   35494216806390423241907689750529  *  
 52   94575592174780415   141976867225561692967630759002113  
 53   189151184349560831   567907468902246771870523036008449  
 54   378302368699121663   2271629875608987087482092144033793  
 55   756604737398243327   9086519502435948349928368576135169  
 56   1513209474796486655   36346078009743793399713474304540673  
 57   3026418949592973311   145384312038975173598853897218162689  
 58   6052837899185946623   581537248155900694395415588872650753  
 59   12105675798371893247   2326148992623602777581662355490603009  
 60   24211351596743786495   9304595970494411110326649421962412033  **  
 61   48422703193487572991   37218383881977644441306597687849648129  
 62   96845406386975145983   148873535527910577765226390751398592513  
 63   193690812773950291967   595494142111642311060905563005594370049  
 64   387381625547900583935   2381976568446569244243622252022377480193  
 65   774763251095801167871   9527906273786276976974489008089509920769  
 66   1549526502191602335743   38111625095145107907897956032358039683073  
 67   3099053004383204671487   152446500380580431631591824129432158732289  
 68   6198106008766409342975   609786001522321726526367296517728634929153  
 69   12396212017532818685951   2439144006089286906105469186070914539716609  
 70   24792424035065637371903   9756576024357147624421876744283658158866433  
 71   49584848070131274743807   39026304097428590497687506977134632635465729  
 72   99169696140262549487615   156105216389714361990750027908538530541862913  
 73   198339392280525098975231   624420865558857447963000111634154122167451649  
 74   396678784561050197950463   2497683462235429791852000446536616488669806593  *  
 75   793357569122100395900927   9990733848941719167408001786146465954679226369  
 76   1586715138244200791801855   39962935395766876669632007144585863818716905473  
 77   3173430276488401583603711   159851741583067506678528028578343455274867621889  
 78   6346860552976803167207423   639406966332270026714112114313373821099470487553  
 79   12693721105953606334414847   2557627865329080106856448457253495284397881950209  
 80   25387442211907212668829695   10230511461316320427425793829013981137591527800833  
 81   50774884423814425337659391   40922045845265281709703175316055924550366111203329  
 82   101549768847628850675318783   163688183381061126838812701264223698201464444813313  
 83   203099537695257701350637567   654752733524244507355250805056894792805857779253249  
 84   406199075390515402701275135   2619010934096978029421003220227579171223431117012993  
 85   812398150781030805402550271   10476043736387912117684012880910316684893724468051969  
 86   1624796301562061610805100543   41904174945551648470736051523641266739574897872207873  
 87   3249592603124123221610201087   167616699782206593882944206094565066958299591488831489  **  
 88   6499185206248246443220402175   670466799128826375531776824378260267833198365955325953  
 89   12998370412496492886440804351   2681867196515305502127107297513041071332793463821303809  
 90   25996740824992985772881608703   10727468786061222008508429190052164285331173855285215233  **  
 91   51993481649985971545763217407   42909875144244888034033716760208657141324695421140860929  
 92   103986963299971943091526434815   171639500576979552136134867040834628565298781684563443713  
 93   207973926599943886183052869631   686558002307918208544539468163338514261195126738253774849  
 94   415947853199887772366105739263   2746232009231672834178157872653354057044780506953015099393  
 95   831895706399775544732211478527   10984928036926691336712631490613416228179122027812060397569  **  
 96   1663791412799551089464422957055   43939712147706765346850525962453664912716488111248241590273  
 97   3327582825599102178928845914111   175758848590827061387402103849814659650865952444992966361089  
 98   6655165651198204357857691828223   703035394363308245549608415399258638603463809779971865444353  
 99   13310331302396408715715383656447   2812141577453232982198433661597034554413855239119887461777409  
 100   26620662604792817431430767312895   11248566309812931928793734646388138217655420956479549847109633  



    5   kill "prmtgthr.txt":open "prmtgthr.txt" for output as #2
   10   for N=2 to 100
   20      F1=N^4+1:F2=17*2^N-1
   30      print #2,N,F1,F2,
   35      Fl1=0:Fl2=0
   40      if fnPrime(F1) then print #2,"* ",:Fl1=1
   50      if fnPrime(F2) then print #2,"** ",:Fl2=2
   55      if Fl1=1 or Fl2=2 then print N,F1,F2,Fl1,Fl2
   60      print #2,
  100   next N
  110   for N=1 to 100
  120      F1=21*2^N-1:F2=7*4^N+1
  130      print #2,N,F1,F2,
  135      Fl1=0:Fl2=0
  140      if fnPrime(F1) then print #2,"* ",:Fl1=1
  150      if fnPrime(F2) then print #2,"** ",:Fl2=2
  155      if Fl1=1 or Fl2=2 then print N,F1,F2,Fl1,Fl2
  160      print #2,
  200   next N
  799   close #2
  800   end
  900   '
10000   fnOddfact(N)
10010   local K=0,P
10030   while N@2=0
10040     N=N\2
10050     K=K+1
10060   wend
10070   P=pack(N,K)
10080   return(P)
10090   '
10100   fnPrime(N)
10110   local I,X,J,Y,Q,K,T,Ans
10120   if N@2=0 then Ans=0:goto *EndPrime
10125   O=fnOddfact(N-1)
10130   Q=member(O,1)
10140   K=member(O,2)
10150   I=0
10160   repeat
10170     repeat
10180       X=fnLrand(N)
10190     until X>1
10200     J=0
10210     Y=modpow(X,Q,N)
10220     loop
10230       if or{and{J=0,Y=1},Y=N-1} then goto *ProbPrime
10240       if and{J>0,Y=1} then goto *NotPrime
10250       J=J+1
10260       if J=K then goto *NotPrime
10270       Y=(Y*Y)@N
10280     endloop
10290    *ProbPrime
10300     I=I+1
10310   until I>50
10320   Ans=1
10330   goto *EndPrime
10340   *NotPrime
10350   Ans=0
10360   *EndPrime
10370   return(Ans)
10380   '
10400   fnLrand(N)
10410   local R
10415   N=int(N)
10420   R=(int(rnd*10^(alen(N)+2)))@N
10430   return(R)
10440   '
10500   fnNxprime(X)
10510   if X@2=0 then X=X+1
10520   while fnPrime(X)=0
10530     X=X+2
10540   wend
10550   return(X)
10560   '


  Posted by Charlie on 2017-09-30 15:52:22
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information