login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228101 a(n) is the least k such that (2n)^(2^k) + 1 is a prime; a(n) = -1 if a prime (2n)^(2^k) + 1 is unknown, or = -2 if impossible. 2
0, 0, 0, -2, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, -2, 2, 0, -1, 0, 0, 4, 0, 2, -1, 0, 1, 1, 0, 0, -1, -2, 0, -1, 0, 0, 1, 4, 0, 2, 0, 1, -1, 0, 1, -1, 1, 0, -1, 0, 0, -1, 0, 0, 1, 0, 5, 1, 2, 1, -1, 1, 0, -2, 0, 2, 1, 0, 0, 2, 2, -1, 1, 0, 0, 3, 2, 0, 4, 1, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

A prime number of the form b^(2^k) + 1 is called a generalized Fermat prime to base b.

See the hyperlink for more information and links.

The impossibility case, a(n) = -2, occurs exactly if 2n is a member of A070265. Or equivalently, n is in A126032. - Jeppe Stig Nielsen, Jul 02 2017

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..500

Lucile and Yves Gallot, Welcome to the Generalized Fermat Prime Search!

MATHEMATICA

f[b_?EvenQ] := f[b] = Block[{k = 0}, While[! PrimeQ[b^(2^k) + 1], k++]; k];

lst = {38, 50, 62, 68, 86, 92, 98, 104, 122, 144, 168, 182, 186, 200, 202, 212, 214, 218, 244, 246, 252, 258, 286, 294, 298, 302, 304, 308, 322, 324, 338, 344, 354, 356, 362, 368, 380, 390, 394, 398, 402, 404, 410, 416, 422, 424, 446, 450, 454, 458, 468, 480, 482, 484, 500, 514, 518, 524, 528, 530, 534, 538, 552, 558, 564, 572, 574, 578, 580, 590, 602, 604, 608, 620, 622, 626, 632, 638, 648, 650, 662, 666, 668, 670, 678, 684, 692, 694, 698, 706, 712, 720, 722, 724, 734, 744, 746, 752, 754, 762, 766, 770, 792, 794, 802, 806, 812, 814, 818, 836, 840, 842, 844, 848, 854, 868, 870, 872, 878, 888, 896, 902, 904, 908, 922, 924, 926, 932, 938, 942, 944, 948, 954, 958, 964, 968, 974, 978, 980, 988, 994, 998}; (f[#] = -1) & /@ lst;

lst = {8, 32, 64, 128, 216, 512, 1000}; (f[#] = -2) & /@ lst; Table[ f[b], {b, 2, 1000, 2}]

(* Second program: *)

Module[{r = 83, nn = 12, s = {}, k}, Do[If[b > r, Break[], Do[If[Set[k, b^m/2] > r, Break[], AppendTo[s, k]], {m, 3, Infinity, 2}]], {b, 2, Infinity, 2}]; Table[If[MemberQ[s, n], -2, SelectFirst[Range[0, nn], PrimeQ[(2 n)^(2^#) + 1] &] /. x_ /; MissingQ@ x -> -1], {n, r}]] (* Michael De Vlieger, Jul 04 2017, Version 10.2 *)

CROSSREFS

Cf. A056993, A079706, A084712, A070265, A126032.

Sequence in context: A216513 A291437 A302231 * A078128 A191269 A216602

Adjacent sequences:  A228098 A228099 A228100 * A228102 A228103 A228104

KEYWORD

sign,hard

AUTHOR

Yves Gallot (galloty(AT)wanadoo.fr) and Robert G. Wilson v, Aug 14 2013

EXTENSIONS

Definition rewritten by Jeppe Stig Nielsen, Jul 02 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 14 12:31 EDT 2019. Contains 328006 sequences. (Running on oeis4.)