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.
%I A194591 #41 Apr 24 2025 07:01:25 %S A194591 0,0,0,0,1,0,1,0,1,0,1,0,2,0,1,0,2,0,1,0,1,0,1,0,2,1,1,0,1,0,1,0,1,1, %T A194591 1,0,1,0,1,0,1,0,2,0,1,0,4,0,1,1,1,0,1,0,1,1,1,0,5,0,3,0,1,1,1,0,2,0, %U A194591 1,0,2,0,2,0,1,1,2,0,1,0,1,0,1,0,4,1 %N A194591 Least k >= 0 such that n*2^k - 1 or n*2^k + 1 is prime, or -1 if no such value exists. %C A194591 Fred Cohen and J. L. Selfridge showed that a(n) = -1 infinitely often. %C A194591 a(n) = 0 iff n is in A045718. %H A194591 Arkadiusz Wesolowski, <a href="/A194591/b194591.txt">Table of n, a(n) for n = 1..1000</a> %H A194591 Fred Cohen and J. L. Selfridge, <a href="https://doi.org/10.1090/S0025-5718-1975-0376583-0">Not every number is the sum or difference of two prime powers</a>, Math. Comp. 29 (1975), 79-81. %H A194591 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BrierNumber.html">Brier Number</a> %F A194591 If a(n)>0, then a(2n)=a(n)-1. %e A194591 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. %t A194591 Table[k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* _T. D. Noe_, Aug 29 2011 *) %Y A194591 Cf. A194603, A194606, A194607, A194608, A194635, A194636, A194637, A194638, A194639. %Y A194591 Cf. A040081, A040076, A076335, A180247. %Y A194591 Cf. A217892 and A194600 (indices and values of the records). %K A194591 sign %O A194591 1,13 %A A194591 _Arkadiusz Wesolowski_, Aug 29 2011