A234594 Erroneous version of Brier numbers A076335.
143665583045350793098657, 1547374756499590486317191, 3127894363368981760543181, 3780564951798029783879299
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
For n=7, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(7)=1.
Table[k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* T. D. Noe, Aug 29 2011 *)
A194591(59) = 5 since A194591(109) = 6 is the next record value.
l = -1; Flatten[Table[k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; If[k > l, l = k, {}], {n, 10^5}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)
For n=7, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(7)=13.
Table[k = 0; While[! PrimeQ[a = n*2^k - 1] && ! PrimeQ[a = n*2^k + 1], k++]; a, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *) n2k[n_]:=Module[{k=0},While[NoneTrue[n*2^k+{1,-1},PrimeQ],k++];SelectFirst[ n*2^k+{-1,1},PrimeQ]]; Array[n2k,70] (* The program uses the NoneTrue and SelectFirst functions from Mathematica version 10 *) (* Harvey P. Dale, Jun 03 2015 *)
For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=1.
Table[p = Prime[n]; k = 0; While[! PrimeQ[p*2^k - 1] && ! PrimeQ[p*2^k + 1], k++]; k, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)
For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=13.
Table[p = Prime[n]; k = 0; While[! PrimeQ[a = p*2^k - 1] && ! PrimeQ[a = p*2^k + 1], k++]; a, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)
l = -1; Flatten[Table[p = Prime[n]; k = 0; While[! PrimeQ[p*2^k - 1] && ! PrimeQ[p*2^k + 1], k++]; If[k > l, l = k; p, {}], {n, 10^4}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)
Comments