# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a002053 Showing 1-1 of 1 %I A002053 M0871 N0333 #33 Jan 02 2023 02:17:12 %S A002053 2,3,8,13,20,31,32,53,76,79,80,117,176,181,182,193,200,283,284,285, %T A002053 286,293,440,443,468,661,678,683,684,1075,1076,1087,1088,1091,1092, %U A002053 1093,1106,1109,1128,1129,1130,1131,1132,1637,1638,1753,1756,1759,1760,2699 %N A002053 a(n) = least value of m for which Liouville's function A002819(m) = -n. %C A002053 Also when n first appears in A072203(m). %D A002053 H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409. %D A002053 H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55. %D A002053 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002053 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002053 Chai Wah Wu, Table of n, a(n) for n = 0..10000 (n = 0..2000 from T. D. Noe) %H A002053 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 A002053 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] %t A002053 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}] %o A002053 (Python) %o A002053 from functools import reduce %o A002053 from operator import ixor %o A002053 from itertools import count %o A002053 from sympy import factorint %o A002053 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 %Y A002053 Cf. A008836, A028488, A072203. %K A002053 nonn,nice,look %O A002053 0,1 %A A002053 _N. J. A. Sloane_ %E A002053 More terms from _Jud McCranie_ # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE