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.
%I A126168 #15 Mar 20 2025 03:35:41 %S A126168 0,1,1,1,1,6,1,7,1,8,1,8,1,10,9,1,1,12,1,10,11,14,1,36,1,16,13,12,1, %T A126168 42,1,19,15,20,13,14,1,22,17,50,1,54,1,16,15,26,1,20,1,28,21,18,1,66, %U A126168 17,64,23,32,1,60,1,34,17,21,19,78,1,22,27,74,1,78,1,40,29 %N A126168 Sum of the proper infinitary divisors of n. %C A126168 A divisor of n is called infinitary if it is a product of divisors of the form p^{y_a 2^a}, where p^y is a prime power dividing n and sum_a y_a 2^a is the binary representation of y. %H A126168 Antti Karttunen, <a href="/A126168/b126168.txt">Table of n, a(n) for n = 1..10000</a> %H A126168 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/InfinitaryDivisor.html">Infinitary Divisor</a>. %F A126168 a(n) = isigma(n) - n = A049417(n) - n. %e A126168 As the infinitary divisors of 240 are 1, 3, 5, 15, 16, 48, 80, 240, we have a(240) = 1 + 3 + 5 + 15 + 16 + 48 + 80 = 168. %p A126168 A049417 := proc(n) %p A126168 local a,pe,k,edgs,p ; %p A126168 a := 1; %p A126168 for pe in ifactors(n)[2] do %p A126168 p := op(1,pe) ; %p A126168 edgs := convert(op(2,pe),base,2) ; %p A126168 for k from 0 to nops(edgs)-1 do %p A126168 dk := op(k+1,edgs) ; %p A126168 a := a*(p^(2^k*(1+dk))-1)/(p^(2^k)-1) ; %p A126168 end do: %p A126168 end do: %p A126168 a ; %p A126168 end proc: %p A126168 A126168 := proc(n) %p A126168 A049417(n)-n ; %p A126168 end proc: %p A126168 seq(A126168(n),n=1..100) ; # _R. J. Mathar_, Jul 23 2021 %t A126168 ExponentList[n_Integer, factors_List] := {#, IntegerExponent[n, # ]} & /@ factors; InfinitaryDivisors[1] := {1}; InfinitaryDivisors[n_Integer?Positive] := Module[ { factors = First /@ FactorInteger[n], d = Divisors[n] }, d[[Flatten[Position[ Transpose[ Thread[Function[{f, g}, BitOr[f, g] == g][ #, Last[ # ]]] & /@ Transpose[Last /@ ExponentList[ #, factors] & /@ d]], _?( And @@ # &), {1}]] ]] ] Null; properinfinitarydivisorsum[k_] := Plus @@ InfinitaryDivisors[k] - k; properinfinitarydivisorsum /@ Range[75] %t A126168 f[p_, e_] := p^(2^(-1 + Position[Reverse @ IntegerDigits[e, 2], _?(# == 1 &)])); isigma[1] = 1; isigma[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n]) + 1); a[n_] := isigma[n] - n; Array[a, 100] (* _Amiram Eldar_, Mar 20 2025 *) %o A126168 (PARI) %o A126168 A049417(n) = {my(b, f=factorint(n)); prod(k=1, #f[, 2], b = binary(f[k, 2]); prod(j=1, #b, if(b[j], 1+f[k, 1]^(2^(#b-j)), 1)))} \\ This function from _Andrew Lelechenko_, Apr 22 2014 %o A126168 A126168(n) = (A049417(n) - n); \\ _Antti Karttunen_, Oct 04 2017, after the given formula. %Y A126168 Cf. A049417, A037445, A126164. %K A126168 easy,nonn %O A126168 1,6 %A A126168 _Ant King_, Dec 21 2006