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!)
A260187 a(n) = n modulo the greatest primorial <= n. 2
0, 0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
COMMENTS
I think this can help in finding prime numbers.
If n>2 and a(n)=0 then n is not prime.
If n>2 and 2 <= a(n) <= p with p = A006530(A260188(n)) (i.e., greatest prime factor of A260188(n)) then n is not prime.
If n>2 and (a(n) mod k) = 0 and 2 <= k <= p with p = A006530(A260188(n)) (i.e., greatest prime factor of A260188(n)) then n is not prime.
Alternative definition: count up from 0 to primorial(n)-1, prime(n+1)-1 times, where primorial(n) is A002110(n). - Franklin T. Adams-Watters, Jul 20 2015
LINKS
Jean-Marc Rebert, Table of n, a(n) for n = 1..40000 (first 10000 terms from Charles R Greathouse IV)
FORMULA
a(n) = n mod A260188(n).
a(n) <= (n+1)/2. - Charles R Greathouse IV, Jul 20 2015
EXAMPLE
a(5) = 1 because 5 modulo 2# = 1 and 2# = 2 is the greatest primorial <= 5. (3# = 2*3 = 6 > 5)
MAPLE
N:= 100: # to get a(1) to a(N)
P:= 1: p:= 2: R:= 2:
for n from 1 to N do
if n >= R then
P:= R; p:= nextprime(p); R:= P*p;
fi;
A[n]:= n mod P;
od:
seq(A[i], i=1..N); # Robert Israel, Jul 20 2015
MATHEMATICA
s = Product[Prime@ n, {n, #}] & /@ Range[0, 6]; Table[Mod[n, Last@ Select[s, # <= n &]], {n, 120}] (* Michael De Vlieger, Jul 20 2015 *)
f[n_] := Block[{m = p = 1}, While[p*(m + 1) <= n, p = p*m; m = NextPrime@ m]; Mod[n, p]]; Array[f, 101] (* Robert G. Wilson v, Jul 21 2015 *)
PROG
(PARI) a(n)=my(t=1, k); forprime(p=2, , k=t*p; if(k>n, return(n%t), t=k)) \\ Charles R Greathouse IV, Jul 20 2015
CROSSREFS
Cf. A034386 and A002110 (primorials), A260188, A257687.
Sequence in context: A030567 A049265 A010875 * A257687 A309957 A365459
KEYWORD
nonn
AUTHOR
Jean-Marc Rebert, Jul 18 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 May 15 06:57 EDT 2024. Contains 372538 sequences. (Running on oeis4.)