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.

A240979 Sum of unitary anti-divisors of n.

This page as a plain text file.
%I A240979 #20 Aug 17 2024 10:10:04
%S A240979 0,0,2,3,5,0,10,8,2,10,12,5,19,12,2,14,28,12,18,16,2,32,34,7,29,20,18,
%T A240979 38,24,0,42,58,20,26,28,0,50,66,20,39,41,22,56,32,22,54,60,24,58,56,2,
%U A240979 86,88,0,42,40,30,92,90,35,57,74,32,46,48,26,132,104,2
%N A240979 Sum of unitary anti-divisors of n.
%C A240979 For unitary anti-divisors of n are intended all the anti-divisors of n which are coprime to n.
%H A240979 Paolo P. Lava, <a href="/A240979/b240979.txt">Table of n, a(n) for n = 1..1000</a>
%F A240979 Anti-divisors of 14 are 3, 4, 9. Anti-divisors coprime to 14 are 3 and 9 and therefore a(14) = 3 + 9 = 12.
%p A240979 P:=proc(q) local a,k,n,v; v:=[]; for n from 1 to q do a:=0;
%p A240979 for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then if gcd(n,k)=1
%p A240979 then a:=a+k; fi; fi; od; v:=[op(v),a]; od; print(op(v)); end: P(69);
%p A240979 # corrected by _Paolo P. Lava_, Aug 17 2024
%t A240979 antiDivisors[n_Integer] := Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]; a240979[n_Integer] := Total[Select[antiDivisors[n], CoprimeQ[#, n] &]]; a240979 /@ Range[120] (* _Michael De Vlieger_, Aug 17 2014 *)
%Y A240979 Cf. A066272, A066417, A242029.
%K A240979 nonn
%O A240979 1,3
%A A240979 _Paolo P. Lava_, Aug 06 2014