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 A336040 #27 Feb 16 2025 08:34:00 %S A336040 1,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0, %T A336040 0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0, %U A336040 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0 %N A336040 Characteristic function of refactorable numbers (A033950). %H A336040 Antti Karttunen, <a href="/A336040/b336040.txt">Table of n, a(n) for n = 1..65537</a> %H A336040 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RefactorableNumber.html">Refactorable Number</a> %H A336040 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %F A336040 a(n) = 1 - ceiling(n/d(n)) + floor(n/d(n)), where d(n) is the number of divisors of n (A000005). %F A336040 a(n) = [A054008(n) == 0], where [ ] is the Iverson bracket. - _Antti Karttunen_, Nov 24 2021 %F A336040 a(p) = 0 for odd primes p. - _Wesley Ivan Hurt_, Nov 28 2021 %e A336040 a(1) = 1 since d(1) = 1 and 1 divides 1. %e A336040 a(2) = 1 since d(2) = 2 and 2 divides 2. %e A336040 a(3) = 0 since d(3) = 2, but 2 does not divide 3. %t A336040 a[n_] := Boole @ Divisible[n, DivisorSigma[0, n]]; Array[a, 100] (* _Amiram Eldar_, Jul 08 2020 *) %o A336040 (PARI) a(n) = n%numdiv(n) == 0; \\ _Michel Marcus_, Jul 07 2020 %Y A336040 Cf. A000005, A033950, A054008, A336041 (inverse Möbius transform), A335182, A335665, A349322. %K A336040 nonn,easy %O A336040 1,1 %A A336040 _Wesley Ivan Hurt_, Jul 07 2020