|
|
A336040
|
|
Characteristic function of refactorable numbers (A033950).
|
|
10
|
|
|
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, 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, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 - ceiling(n/d(n)) + floor(n/d(n)), where d(n) is the number of divisors of n (A000005).
|
|
EXAMPLE
|
a(1) = 1 since d(1) = 1 and 1 divides 1.
a(2) = 1 since d(2) = 2 and 2 divides 2.
a(3) = 0 since d(3) = 2, but 2 does not divide 3.
|
|
MATHEMATICA
|
a[n_] := Boole @ Divisible[n, DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Jul 08 2020 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|