OFFSET
0,1
COMMENTS
Also when n first appears in A072203(m).
REFERENCES
H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409.
H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000 (n = 0..2000 from T. D. Noe)
H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409. [Annotated scanned copy]
H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55. [Annotated scanned copy]
MATHEMATICA
f[n_] := f[n] = f[n - 1] -(-1)^Length[Flatten[Table[ #[[1]], {#[[2]]}] & /@ FactorInteger[n]]]; f[1] = 0; Do[k = 1; While[f[k] != n, k++ ]; Print[k], {n, 1, 50}]
PROG
(Python)
from functools import reduce
from operator import ixor
from itertools import count
from sympy import factorint
def A002053(n): return next(filter(lambda m:-n==sum(-1 if reduce(ixor, factorint(i).values(), 0)&1 else 1 for i in range(1, m+1)), count(1))) # Chai Wah Wu, Jan 01 2023
CROSSREFS
KEYWORD
AUTHOR
EXTENSIONS
More terms from Jud McCranie
STATUS
approved