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 A303711 #14 May 03 2018 17:45:35 %S A303711 0,0,0,1,2,0,3,0,2,3,8,0,9,4,3,6,19,8,19,4,5,11,20,0,5,12,8,5,26,0,27, %T A303711 6,12,19,8,4,35,24,11,5,42,10,46,13,8,26,50,8,17,18,28,29,64,16,15,8, %U A303711 19,41,56,0,57,30,9,14,23,27,85,36,31,15,78,12,80 %N A303711 For any n > 0 and f > 0, let d_f(n) be the distance from n to the nearest number congruent mod f! to some divisor of f!; a(n) = Sum_{i > 0} d_i(n). %C A303711 For any n > 0 and f >= A002034(n), d_f(n) = 0; hence the series in the name contains only finitely many nonzero terms and is well defined. %C A303711 See also A303545 and A303548 for similar sequences; unlike these sequences, the indexed family {d_i, i > 0} used here does not satisfy for any n > 0 and f < g the inequality d_f(n) >= d_g(n); also d_i is i!-periodic for any i > 0. %H A303711 Rémy Sigrist, <a href="/A303711/b303711.txt">Table of n, a(n) for n = 1..10000</a> %H A303711 Rémy Sigrist, <a href="/A303711/a303711.png">Colored pin plot of the first 2000 terms</a> (where the color is function of the number f in the term d_f(n)) %H A303711 Rémy Sigrist, <a href="/A303711/a303711.gp.txt">PARI program for A303711</a> %H A303711 <a href="/index/Di#distance_to_the_nearest">Index entries for sequences related to distance to nearest element of some set</a> %F A303711 a(n) = 0 iff n belongs to A303703. %e A303711 For n = 42: %e A303711 - d_1(n) = 0, %e A303711 - d_2(n) = 0, %e A303711 - d_3(n) = 0, %e A303711 - d_4(n) = |42 - 36| = |42 - 48| = 6, %e A303711 - d_5(n) = |42 - 40| = 2, %e A303711 - d_6(n) = |42 - 40| = 2, %e A303711 - d_f(n) = 0 for any f >= 7, %e A303711 - hence a(42) = 6 + 2 + 2 = 10. %o A303711 (PARI) See Links section. %Y A303711 Cf. A002034, A303545, A303548, A303703. %K A303711 nonn,look %O A303711 1,5 %A A303711 _Rémy Sigrist_, Apr 29 2018