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).

This page as a plain text file.
%I A074749 #14 Jan 15 2025 11:48:52
%S A074749 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,
%T A074749 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,
%U A074749 1,1,4,1,1,2,1,1,4,1,1,1,1,4,1,1,1,5,1,1
%N A074749 Smallest difference between consecutive anti-divisors of n (ordered by size).
%C A074749 See A066272 for definition of anti-divisor.
%H A074749 Antti Karttunen, <a href="/A074749/b074749.txt">Table of n, a(n) for n = 1..20000</a>
%e A074749 For n=13, anti-divisors={2,3,5,9}; differences={1,2,4}; a(13) = smallest difference = 1.
%t A074749 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 *)
%o A074749 (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
%Y A074749 Cf. A066272, A130799.
%K A074749 nonn
%O A074749 1,8
%A A074749 _Jason Earls_, Sep 06 2002
%E A074749 More terms from _Amiram Eldar_, Feb 03 2020