login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260757 Least k > 0 such that M(n)^2 - 2k is prime, where M(n) = 2^n - 1 = A000225(n). 2
1, 2, 1, 1, 1, 4, 1, 1, 7, 10, 1, 10, 1, 10, 5, 1, 14, 24, 1, 1, 13, 1, 16, 3, 82, 1, 19, 1, 23, 94, 64, 58, 7, 6, 14, 3, 46, 22, 5, 13, 107, 69, 38, 90, 59, 75, 104, 25, 4, 10, 14, 4, 44, 10, 5, 1, 77, 81, 85, 94, 71, 9, 14, 111, 13, 27, 20, 9, 37, 6, 5, 4, 62, 12, 38, 4, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
For n = 0 and n = 1, no k > 0 can yield a positive prime, the given values are the smallest to yield the opposite of a positive prime: M(0)^2 - 2*1 = 0 - 2 = -2 and M(1)^2 - 2*2 = 1 - 4 = -3.
LINKS
FORMULA
a(n) = 1 for n=0 or n in A091515.
EXAMPLE
For n = 2, M(2) = 2^2 - 1 = 3 and 3*3 - 2k = 7 is a prime for k=1, thus a(2) = 1.
For n = 3, M(3) = 2^3 - 1 = 7 and 7*7 - 2k = 47 is a prime for k=1, thus a(3) = 1.
For n = 4, M(4) = 2^4 - 1 = 15 and 15*15 - 2k = 223 is a prime for k=1, thus a(4) = 1.
For n = 5, M(5) = 2^5 - 1 = 31 and 31*31 - 2k = 953 is prime for k=4 and no smaller k, thus a(5) = 4.
MAPLE
f:= proc(n) local r;
r:= (2^n-1)^2;
(r - prevprime(r))/2
end proc:
f(0):=1: f(1):= 2:
map(f, [$0..100]); # Robert Israel, Apr 02 2020
MATHEMATICA
f[n_] := Module[{r = (2^n - 1)^2}, (r - NextPrime[r, -1])/2 ];
f[0] = 1; f[1] = 2;
f /@ Range[0, 100] (* Jean-François Alcover, Jul 28 2020, after Robert Israel *)
PROG
(PARI) a(n)={n>1&&for(k=1, 9e9, ispseudoprime((2^n-1)^2-2*k)&&return(k)); n+1}
CROSSREFS
Cf. A091515 (a(n)=1 for n > 0), A260758.
Sequence in context: A329036 A205552 A255707 * A157114 A156786 A156141
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 30 2015
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)