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 A158976 #4 Sep 08 2022 08:45:43 %S A158976 0,0,0,0,4,0,10,6,18,23,37,10,49,45,54,66,94,75,112,90,123,149,175, %T A158976 120,199,220,241,251,305,236,335,307,358,396,409,385,505,501,534,499, %U A158976 622,568,664,630,632,749,799,688,847,857,937,959,1049,985,1078,1039,1205 %N A158976 a(n) = sum of numbers k <= n such that not all proper divisors of k are divisors of n. %C A158976 For primes p, a(p) = A000217(p) - A158662(p) = A000217(p) - A014284(A036234(p)). %e A158976 For n = 7 we have the following proper divisors for k <= n: {1}, {1}, {1}, {1, 2}, {1}, {1, 2, 3}, {1}. Only 4 and 6 have proper divisors that are not divisors of 7, viz. 2 and 2, 3. Hence a(7) = 4 + 6 = 10. %o A158976 (Magma) [ IsEmpty(S) select 0 else &+S where S is [ k: k in [1..n] | exists(t){ d: d in Divisors(k) | d ne k and d notin Divisors(n) } ]: n in [1..57] ]; %Y A158976 Cf. A000040, A000217, A158662, A014284, A036234, A158974. %K A158976 nonn %O A158976 1,5 %A A158976 _Jaroslav Krizek_, Apr 01 2009 %E A158976 Edited and extended by _Klaus Brockhaus_, Apr 06 2009