login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165560 The arithmetic derivative of n, modulo 2. 18
0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = A003415(n) mod 2.
a(n) = (1-(-1)^n')/2.
a(A235991(n)) = 1 and a(A235992(n)) = 0. - Reinhard Zumkeller, Mar 11 2014
a(n) = 1 - A358680(n) = A358680(n) - A359792(n) = A358771(n) + A358773(n). - Antti Karttunen, Jan 16 2023
MAPLE
with(numtheory);
P:=proc(i)
local f, n, p, pfs;
for n from 0 by 1 to i do
pfs:=ifactors(n)[2]; f:=n*add(op(2, p)/op(1, p), p=pfs);
print(1/2*(1-(-1)^f));
od;
end:
P(1000);
MATHEMATICA
d[0] = d[1] = 0; d[n_] := n*Total[f = FactorInteger[n]; f[[All, 2]]/f[[All, 1]] ]; a[n_] := Mod[d[n], 2]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Apr 22 2015 *)
PROG
(Haskell)
a165560 = flip mod 2 . a003415 -- Reinhard Zumkeller, Mar 11 2014
(Python)
from sympy import factorint
def A165560(n): return int(n&3==2 or (n&1 and sum(factorint(n).values())&1)) # Chai Wah Wu, Nov 04 2022
(PARI) A165560(n) = if(n<=1, 0, my(f=factor(n)); (n*sum(i=1, #f~, f[i, 2]/f[i, 1]))%2); \\ Antti Karttunen, Nov 04 2022
CROSSREFS
Characteristic function of A235991, whose complement A235992 gives the positions of 0's.
Cf. A000035, A003415, A347870 [= a(sigma(n))], A353493, A353494, A353495, A358680 (one's complement), A359792.
Sum of A358771 and A358773.
Sequence in context: A126564 A180433 A358771 * A358220 A354874 A014306
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Entries checked by R. J. Mathar, Oct 07 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)