This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A231725 Least positive integer k < n such that n + k + 2^k is prime, or 0 if such an integer k does not exist. 5
 0, 1, 0, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 10, 1, 2, 3, 6, 1, 4, 5, 2, 5, 2, 1, 4, 1, 8, 3, 2, 3, 4, 1, 2, 3, 2, 1, 4, 1, 2, 3, 6, 1, 12, 5, 2, 3, 8, 1, 4, 5, 2, 11, 2, 1, 6, 1, 4, 3, 2, 3, 4, 1, 2, 5, 2, 1, 4, 1, 22, 3, 2, 57, 10, 1, 2, 3, 6, 1, 4, 11, 2, 11, 8, 1, 4, 7, 4, 3, 2, 3, 4, 1, 2, 3, 2, 1, 16, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS This was motivated by A231201 and A231557. Conjecture: a(n) > 0 for all n > 3. We have verified this for n up to 2*10^6;  for example, we find the following relatively large values of a(n): a(65958) = 37055, a(299591) = 51116, a(295975) = 13128, a(657671) = 25724,  a(797083) = 44940, a(1278071) = 24146, a(1299037) = 34502, a(1351668) = 25121, a(1607237) = 34606, a(1710792) = 11187, a(1712889) = 18438. I conjecture the opposite. In particular I expect that a(n) = 0 for infinitely many values of n. - Charles R Greathouse IV, Nov 13 2013 LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..10000 Z.-W. Sun, On a^n+ bn modulo m, arXiv preprint arXiv:1312.1166 [math.NT], 2013-2014. EXAMPLE a(3) = 0 since 3 + 1 + 2^1 = 6 and 3 + 2 + 2^2 = 9 are both composite. a(5) = 2 since 5 + 1 + 2^1 = 8 is not prime, but 5 + 2 + 2^2 = 11 is prime. MATHEMATICA Do[Do[If[PrimeQ[n+k+2^k], Print[n, " ", k]; Goto[aa]], {k, 1, n-1}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}] PROG (PARI) a(n)=for(k=1, n-1, if(ispseudoprime(n+k+2^k), return(k))); 0 \\ Charles R Greathouse IV, Nov 13 2013 CROSSREFS Cf. A000040, A000079, A231201, A231516, A231557, A231561, A231631, A231776. Sequence in context: A060475 A168069 A280929 * A106559 A280047 A106377 Adjacent sequences:  A231722 A231723 A231724 * A231726 A231727 A231728 KEYWORD nonn AUTHOR Zhi-Wei Sun, Nov 12 2013 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.

Last modified October 22 03:04 EDT 2019. Contains 328315 sequences. (Running on oeis4.)