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!)
A243917 Number of non-twin divisors of n. 6
1, 2, 0, 1, 2, 2, 2, 2, 1, 4, 2, 1, 2, 4, 1, 3, 2, 4, 2, 4, 2, 4, 2, 2, 3, 4, 2, 4, 2, 5, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 6, 2, 4, 3, 4, 2, 4, 3, 6, 2, 4, 2, 6, 4, 6, 2, 4, 2, 4, 2, 4, 2, 5, 4, 6, 2, 4, 2, 6, 2, 6, 2, 4, 3, 4, 4, 6, 2, 6, 3, 4, 2, 5, 4, 4, 2, 6, 2, 9, 4, 4, 2, 4, 4, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A divisor k of n is non-twin if neither the positive values of k - 2 nor k + 2 divide n.
LINKS
FORMULA
a(n) = A000005(n) - A243865(n).
EXAMPLE
The positive divisors of 12 are: 1, 2, 3, 4, 6, 12. Of these, 1 and 3 are twin divisors, 2, 4 and 6 are also twin divisors. The unique non-twin divisor is therefore 12. So a(12) = the number of these divisors, which is 1.
MATHEMATICA
a243917[n_Integer] := Length[Select[Divisors[n], If[And[# <= 2 || Divisible[n, # - 2] == False, Divisible[n, # + 2] == False], True, False] &]]; a243917 /@ Range[120] (* Michael De Vlieger, Aug 17 2014 *)
nntd[n_]:=Module[{d=Select[Divisors[n], #>2&], t}, t=Count[d, _?(!Divisible[ n, #-2] && !Divisible[ n, #+2]&)]; If[!Divisible[ n, 3], t++]; If[ Divisible[ n, 2] && !Divisible[n, 4], t++]; t]; Array[nntd, 100] (* Harvey P. Dale, May 27 2016 *)
PROG
(PARI) a(n) = sumdiv(n, d, (((d<=2) || (n % (d-2))) && (n % (d+2)))); \\ Michel Marcus, Jun 25 2014
CROSSREFS
Sequence in context: A028832 A260411 A199331 * A254212 A033773 A029275
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by Michel Marcus, Jun 27 2014
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 16 14:17 EDT 2024. Contains 371740 sequences. (Running on oeis4.)