A161849 a(n) = A052369(n) mod A056608(n).
0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 2, 1, 1, 1, 2, 1, 4, 1, 1, 0, 1, 1, 2, 1, 2, 1, 1, 6, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 0, 1, 2, 1, 0, 1, 0, 1, 1, 1, 5, 1, 2, 1, 1, 1
Offset: 1
Keywords
Examples
a(1) = 0 = 2 mod 2; a(2) = 1 = 3 mod 2; a(3) = 0 = 2 mod 2; a(4) = 0 = 3 mod 3; a(5) = 1 = 5 mod 2.
Programs
-
Magma
[ D[ #D] mod D[1]: n in [2..140] | not IsPrime(n) where D is PrimeDivisors(n) ]; // Klaus Brockhaus, Jun 24 2009
-
Maple
A002808 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) : fi; od: fi; end: A006530 := proc(n) local u: if n=1 then 1 else u:= numtheory[factorset](n): max(seq(u[j], j=1..nops(u))) end if end: A020639 := proc(n) local u: if n=1 then 1 else u:= numtheory[factorset](n): min(seq(u[j], j=1..nops(u))) end if end: A052369 := proc(n) A006530(A002808(n)) ; end: A056608 := proc(n) A020639(A002808(n)) ; end: A161849 := proc(n) A052369(n) mod A056608(n) ; end: seq(A161849(n),n=1..120) ; # R. J. Mathar, Jun 23 2009
-
Mathematica
Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1]; a[n_] := With[{f = FactorInteger[Composite[n]]}, f[[-1, 1]]~Mod~f[[1, 1]]]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 15 2023 *)
Extensions
a(102) corrected by R. J. Mathar, Jun 23 2009
Comments