The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A242879 Least positive integer k < n such that k*p == 1 (mod prime(k)) for some prime p < prime(k) and (n-k)*q == 1 (mod prime(n-k)) for some prime q < prime(n-k), or 0 if such a number k does not exist. 1
0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 4, 2, 2, 3, 2, 3, 4, 7, 2, 2, 3, 4, 2, 3, 4, 13, 6, 7, 11, 13, 10, 11, 2, 3, 4, 18, 6, 7, 2, 3, 4, 2, 2, 3, 4, 6, 6, 2, 3, 2, 2, 3, 4, 2, 2, 3, 4, 6, 6, 2, 3, 2, 3, 4, 7, 2, 3, 2, 3, 4, 7, 2, 2, 2, 2, 3, 2, 3, 4, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
According to the conjecture in A242753, a(n) should be positive for all n > 3.
We have verified that a(n) > 0 for all n = 4, ..., 10^8.
LINKS
EXAMPLE
a(4) = 2 since 4 = 2 + 2 and 2*2 == 1 (mod prime(2)=3).
a(7) = 3 since 7 = 3 + 4, 3*2 == 1 (mod prime(3)=5) with 2 prime, and also 4*2 == 1 (mod prime(4)=7) with 2 prime, but 5*9 == 1 (mod prime(5)=11) with 9 not prime.
MATHEMATICA
p[n_]:=PrimeQ[PowerMod[n, -1, Prime[n]]]
Do[Do[If[p[k]&&p[n-k], Print[n, " ", k]; Goto[aa]]; Continue, {k, 1, n/2}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 80}]
CROSSREFS
Sequence in context: A186233 A226056 A104011 * A176775 A175778 A357039
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 25 2014
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 June 8 08:55 EDT 2024. Contains 373207 sequences. (Running on oeis4.)