A245690 a(n) = A245689(n) mod A053669(n).
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 3
Keywords
Examples
For n = 10, the smallest prime non-divisor of 10 is 3. The smallest divisor of 10 that is greater than 3 is 5. 5 mod 3 is 2 so a(10) = 2. For n = 12, the smallest prime non-divisor of 12 is 5. The smallest divisor of 12 that is greater than 5 is 6. 6 mod 5 is 1 so a(12) = 1.
Links
- K. Spage, Table of n, a(n) for n = 3..1000
Programs
-
Maple
a:= proc(n) uses numtheory; local F,p,j; if n::odd then p:= 2 else F:= map(pi,factorset(n)); p:= ithprime(min(map(`+`,F,1) minus F)); fi; for j from p+1 do if n mod j = 0 then return j mod p fi od; end proc: seq(a(n),n=3..100); # Robert Israel, Jul 31 2014
-
Mathematica
A053669[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[CoprimeQ[n, p], Return[p]]]]; A245689[n_] := SelectFirst[Divisors[n], # > A053669[n]&]; A245690[n_] := Mod[A245689[n], A053669[n]]; Table[A245690[n], {n, 3, 100}] (* Jean-François Alcover, May 15 2023 *)
-
PARI
A053669(n) = {forprime(p=2, ,if(n%p, return(p)))} A245689(n) = {my(c=A053669(n)+1);if(isprime(n),n,while(n%c,c++);c)} A245690(n) = {A245689(n) % A053669(n)}
Comments