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!)
A360406 a(n) = minimal positive k such that prime(n) * prime(n+1) * ... * prime(n+k) - 1 is divisible by prime(n+k+1), or -1 if no such k exists. 2
1, 1, 9, 14, 31, 826, 1, 34 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Assuming a(9) exists it is greater than 1.75 million.
a(11) = 692, a(12) = 8, a(13) = 792. - Robert Israel, Feb 22 2023
LINKS
EXAMPLE
a(1) = 1 as prime(1) * prime(2) - 1 = 2 * 3 - 1 = 5, which is divisible by prime(3) = 5.
a(2) = 1 as prime(2) * prime(3) - 1 = 3 * 5 - 1 = 14, which is divisible by prime(4) = 7.
a(3) = 9 as prime(3) * ... * prime(12) - 1 = 1236789689134, which is divisible by prime(13) = 41.
MAPLE
f:= proc(n) local P, k, p;
P:= ithprime(n); p:= nextprime(P);
for k from 0 to 10^6 do
if P-1 mod p = 0 then return k fi;
p:= nextprime(p);
od;
FAIL
end proc:
map(f, [$1..8]); # Robert Israel, Feb 22 2023
PROG
(Python)
from sympy import prime, nextprime
def A360406(n):
p = prime(n)
q = nextprime(p)
s, k = p*q, 1
while (s-1)%(q:=nextprime(q)):
k += 1
s *= q
return k # Chai Wah Wu, Feb 06 2023
CROSSREFS
Sequence in context: A104812 A329751 A093021 * A272781 A229543 A175201
KEYWORD
nonn,more
AUTHOR
Scott R. Shannon, Feb 06 2023
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 August 24 19:46 EDT 2024. Contains 375417 sequences. (Running on oeis4.)