A083218 a(n) = n mod (spf(n+1)+1), where spf(n) is the smallest prime factor of n (A020639).
1, 2, 0, 4, 2, 6, 1, 0, 0, 10, 2, 12, 1, 2, 0, 16, 2, 18, 1, 0, 0, 22, 2, 0, 1, 2, 0, 28, 2, 30, 1, 0, 0, 4, 2, 36, 1, 2, 0, 40, 2, 42, 1, 0, 0, 46, 2, 0, 1, 2, 0, 52, 2, 0, 1, 0, 0, 58, 2, 60, 1, 2, 0, 4, 2, 66, 1, 0, 0, 70, 2, 72, 1, 2, 0, 4, 2, 78, 1, 0, 0, 82, 2, 0, 1, 2, 0, 88, 2, 2, 1, 0, 0, 4, 2, 96
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A057237.
Programs
-
Mathematica
Table[Mod[n,FactorInteger[n+1][[1,1]]+1],{n,100}] (* Harvey P. Dale, May 28 2013 *)
Comments