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 A158975 #4 Sep 08 2022 08:45:43 %S A158975 1,3,6,10,11,21,18,30,27,32,29,68,42,60,66,70,59,96,78,120,108,104, %T A158975 101,180,126,131,137,155,130,229,161,221,203,199,221,281,198,240,246, %U A158975 321,239,335,282,360,403,332,329,488,378,418,389,419,382,500,462,557,448 %N A158975 a(n) = sum of numbers k <= n such that all proper divisors of k are divisors of n. %C A158975 For primes p, a(p) = A158662(p) = A014284(A036234(p)). %e A158975 For n = 8 we have the following proper divisors of k <= n: {1}, {1}, {1}, {1, 2}, {1}, {1, 2, 3}, {1}, {1, 2, 4}. Only k = 6 has a proper divisor that is not a divisor of 8, viz. 3. Hence a(8) = 1 + 2 + 3 + 4 + 5 + 7 + 8 = 30. %o A158975 (Magma) [ &+[ k: k in [1..n] | forall(t){ d: d in Divisors(k) | d eq k or d in Divisors(n) } ]: n in [1..57] ]; %Y A158975 Cf. A000040, A158662, A014284, A036234, 158973. %K A158975 nonn %O A158975 1,2 %A A158975 _Jaroslav Krizek_, Apr 01 2009 %E A158975 Edited and extended by _Klaus Brockhaus_, Apr 06 2009