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!)
A360805 Nonnegative integers k such that k! mod nextprime(k) is larger than k. 2
0, 31, 120, 283, 293, 712, 2872, 3287, 5028, 5129, 7088, 9553, 13229, 14232, 14799, 15113, 20153, 20830, 23239, 30233, 31430, 31667, 34443, 40654, 44298, 50184, 78877, 105834, 115281, 125120, 164253, 192103, 201590, 227747, 239910, 241910, 282230, 322550, 374370 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
{ k >= 0 : k! mod nextprime(k) > k }.
A360825(a(n)) > a(n).
MAPLE
q:= n-> is(n! mod nextprime(n)>n):
select(q, [$0..20000])[];
PROG
(Python)
from itertools import count, islice
from functools import reduce
from sympy import nextprime
def A360805_gen(startvalue=0): # generator of terms >= startvalue
n = max(startvalue, 0)
m = nextprime(n)
while True:
a = m-1
klist = []
for i in range(m-1, n, -1):
a = a*pow(i, -1, m)%m
if a>i-1:
klist.append(i-1)
yield from sorted(klist)
n, m = m, nextprime(m)
A360805_list = list(islice(A360805_gen(), 30)) # Chai Wah Wu, Feb 24 2023
CROSSREFS
Sequence in context: A010019 A256650 A131550 * A158558 A160893 A202994
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 22 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 April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)