Saturday, December 01, 2018

[fwdgrrnc] Primes near powers of 3

Here are some prime numbers of the forms 3^n-k, 3^n+k, and k*3^n+1.  The exponents grow as round(10^(i/25)).  The growth rate was arbitrarily chosen.  Each k is minimal for a given exponent and form.

These might be useful as compactly expressible primes which don't look funny when written in binary.  For example, they will have average-case behavior if used as an exponent in the standard algorithm of exponentiation by repeated squaring, in contrast to numbers like 2^k+n which behave especially well, or 2^k-n which behave especially poorly.

Many previous similar, doing with powers of 2 instead of 3: (1) (2) (3)

3^1-0 3^1+0 2*3^1+1
3^2-2 3^2+2 2*3^2+1
3^3-4 3^3+2 4*3^3+1
3^4-2 3^4+2 2*3^4+1
3^5-2 3^5+8 2*3^5+1
3^6-2 3^6+4 2*3^6+1
3^7-8 3^7+16 8*3^7+1
3^8-8 3^8+2 6*3^8+1
3^9-2 3^9+4 2*3^9+1
3^10-20 3^10+2 8*3^10+1
3^11-16 3^11+20 28*3^11+1
3^12-58 3^12+16 10*3^12+1
3^13-22 3^13+8 12*3^13+1
3^14-8 3^14+2 4*3^14+1
3^16-98 3^16+26 2*3^16+1
3^17-10 3^17+34 2*3^17+1
3^19-14 3^19+56 20*3^19+1
3^21-4 3^21+56 24*3^21+1
3^23-20 3^23+32 48*3^23+1
3^25-20 3^25+14 34*3^25+1
3^28-22 3^28+26 18*3^28+1
3^30-26 3^30+4 2*3^30+1
3^33-52 3^33+70 14*3^33+1
3^36-10 3^36+2 16*3^36+1
3^40-38 3^40+118 62*3^40+1
3^44-34 3^44+8 70*3^44+1
3^48-44 3^48+56 32*3^48+1
3^52-124 3^52+50 8*3^52+1
3^58-220 3^58+158 8*3^58+1
3^63-28 3^63+2 18*3^63+1
3^69-16 3^69+76 70*3^69+1
3^76-370 3^76+28 8*3^76+1
3^83-140 3^83+236 34*3^83+1
3^91-20 3^91+100 340*3^91+1
3^100-10 3^100+148 90*3^100+1
3^110-110 3^110+2 90*3^110+1
3^120-82 3^120+56 176*3^120+1
3^132-28 3^132+382 2*3^132+1
3^145-110 3^145+314 14*3^145+1
3^158-350 3^158+20 188*3^158+1
3^174-128 3^174+4 200*3^174+1
3^191-38 3^191+70 124*3^191+1
3^209-874 3^209+188 136*3^209+1
3^229-364 3^229+560 40*3^229+1
3^251-346 3^251+32 496*3^251+1
3^275-106 3^275+104 456*3^275+1
3^302-538 3^302+140 174*3^302+1
3^331-694 3^331+136 8*3^331+1
3^363-134 3^363+2 56*3^363+1
3^398-98 3^398+764 14*3^398+1
3^437-46 3^437+256 412*3^437+1
3^479-608 3^479+52 198*3^479+1
3^525-380 3^525+928 760*3^525+1
3^575-266 3^575+2860 630*3^575+1
3^631-284 3^631+644 50*3^631+1
3^692-28 3^692+566 162*3^692+1
3^759-1690 3^759+464 664*3^759+1
3^832-832 3^832+652 98*3^832+1
3^912-502 3^912+1018 736*3^912+1
3^1000-1084 3^1000+968 102*3^1000+1
3^1096-1528 3^1096+632 1196*3^1096+1
3^1202-820 3^1202+1024 448*3^1202+1
3^1318-1360 3^1318+32 1550*3^1318+1
3^1445-406 3^1445+2524 156*3^1445+1
3^1585-3836 3^1585+3016 1560*3^1585+1
3^1738-1990 3^1738+2102 380*3^1738+1
3^1905-1234 3^1905+40 312*3^1905+1
3^2089-230 3^2089+1090 2572*3^2089+1
3^2291-6320 3^2291+1132 2008*3^2291+1
3^2512-1244 3^2512+412 2752*3^2512+1
3^2754-2860 3^2754+542 1150*3^2754+1
3^3020-6188 3^3020+2066 492*3^3020+1
3^3311-3158 3^3311+6130 786*3^3311+1
3^3631-5704 3^3631+934 4238*3^3631+1
3^3981-6134 3^3981+1568 202*3^3981+1
3^4365-1312 3^4365+4994 2126*3^4365+1
3^4786-8060 3^4786+5752 272*3^4786+1
3^5248-12320 3^5248+3368 4430*3^5248+1
3^5754-2410 3^5754+1510 8340*3^5754+1
3^6310-4472 3^6310+7750 4248*3^6310+1
3^6918-18850 3^6918+6718 7194*3^6918+1
3^7586-1736 3^7586+10732 5580*3^7586+1
3^8318-4946 3^8318+3914 1308*3^8318+1
3^9120-14878 3^9120+2368 110*3^9120+1
3^10000-1372 3^10000+10466 496*3^10000+1
3^10965-5434 3^10965+8378 2280*3^10965+1
3^12023-20554 3^12023+2402 1160*3^12023+1
3^13183-1678 3^13183+170 19740*3^13183+1
3^14454-7900 3^14454+3064 4362*3^14454+1
3^15849-12890 3^15849+25246 3126*3^15849+1
3^17378-4816 3^17378+6314 15154*3^17378+1
3^19055-2950 3^19055+260 4208*3^19055+1
3^20893-12334 3^20893+19930 3422*3^20893+1
3^22909-111106 3^22909+48196 7270*3^22909+1

The final entry 3^22909-111106 required more than a 64 metric megabyte stack size in Pari/GP.  (I don't understand why precprime needs a large stack.)  After restarting with 256 megabytes, it took 24 hours.

No comments :