cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A074749 Smallest difference between consecutive anti-divisors of n (ordered by size).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 4, 1, 1, 3, 1, 1, 4, 8, 1, 1, 1, 5, 4, 1, 1, 9, 1, 1, 1, 2, 1, 8, 1, 2, 1, 1, 1, 16, 1, 1, 1, 6, 1, 1, 1, 5, 1, 1, 1, 13, 1, 1, 4, 1, 1, 8, 1, 13, 1, 1, 1, 1, 1, 1, 1, 40, 1, 3, 1, 1, 4, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 4, 1, 1, 1, 5, 1, 1
Offset: 1

Views

Author

Jason Earls, Sep 06 2002

Keywords

Comments

See A066272 for definition of anti-divisor.

Examples

			For n=13, anti-divisors={2,3,5,9}; differences={1,2,4}; a(13) = smallest difference = 1.
		

Crossrefs

Programs

  • Mathematica
    min[s_] := If[Length[s] > 0, Min[s], 0]; min /@ Differences /@ Table[Select[Range[2, n - 1], Abs[Mod[n, #] - #/2] < 1 &], {n, 100}] (* Amiram Eldar, Feb 03 2020 after Harvey P. Dale at A066272 *)
  • PARI
    A074749(n) = { my(pad=0,md=0); for(k=2,n,if((n%k) && (!((2*n)%k) || !((2*n-1)%k) || !((2*n+1)%k)), if(pad, md=if(md,min(k-pad,md),k-pad)); pad = k)); (md); }; \\ Antti Karttunen, Jan 15 2025

Extensions

More terms from Amiram Eldar, Feb 03 2020