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.

A066481 Largest anti-divisor of n.

This page as a plain text file.
%I A066481 #13 May 22 2016 12:59:45
%S A066481 2,3,3,4,5,5,6,7,7,8,9,9,10,11,11,12,13,13,14,15,15,16,17,17,18,19,19,
%T A066481 20,21,21,22,23,23,24,25,25,26,27,27,28,29,29,30,31,31,32,33,33,34,35,
%U A066481 35,36,37,37,38,39,39,40,41,41,42,43,43,44,45,45,46,47,47,48,49,49,50
%N A066481 Largest anti-divisor of n.
%C A066481 Apart from initial terms this is identical to A004396.
%C A066481 See A066272 for definition of anti-divisor.
%H A066481 Seiichi Manyama, <a href="/A066481/b066481.txt">Table of n, a(n) for n = 3..10000</a>
%p A066481 antidivisors := proc(n)
%p A066481    local a, k;
%p A066481    a := {} ;
%p A066481    for k from 2 to n-1 do
%p A066481       if abs((n mod k)- k/2) < 1 then
%p A066481          a := a union {k} ;
%p A066481       end if;
%p A066481    end do:
%p A066481    a ;
%p A066481 end proc:
%p A066481 A066481 := proc(n)
%p A066481 if n < 3 then
%p A066481     return 0;
%p A066481 else
%p A066481     sort(convert(antidivisors(n),list)) ;
%p A066481     op(-1,%) ;
%p A066481 end if;
%p A066481 end proc: # _R. J. Mathar_, Mar 15 2013
%t A066481 antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 &], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 &], 2n/Select[ Divisors[2*n], OddQ[ # ] && # != 1 &]]], # < n & ]; Table[ Last[ antid[n]], {n, 3, 100} ]
%o A066481 (PARI) a(n)=2*n\/3 \\ _Charles R Greathouse IV_, Feb 27 2013
%Y A066481 Cf. A066482.
%K A066481 nonn
%O A066481 3,1
%A A066481 _Robert G. Wilson v_, Jan 02 2002