login
Indices k such that A011772(k) is odd.
4

%I #17 Jun 15 2022 14:36:12

%S 1,2,4,6,8,14,15,16,20,22,24,28,30,32,33,38,40,45,46,51,52,54,60,62,

%T 63,64,65,66,69,72,77,86,87,90,91,92,94,95,96,102,112,115,116,118,120,

%U 123,124,126,128,130,134,138,140,141,142,143,144,145,148,152,153,154,156,158,159,161

%N Indices k such that A011772(k) is odd.

%H N. J. A. Sloane, <a href="/A344001/b344001.txt">Table of n, a(n) for n = 1..7187</a>

%o (Python)

%o from sympy.ntheory.modular import crt

%o from sympy import factorint

%o from math import prod

%o from itertools import count, islice, combinations

%o def A344001_gen(): # generator of terms

%o for n in count(1):

%o plist = tuple(p**q for p, q in factorint(2*n).items())

%o if len(plist) == 1 or min(min(crt((m,2*n//m),(0,-1))[0],crt((2*n//m,m),(0,-1))[0]) for m in (prod(d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l))) & 1:

%o yield n

%o A344001_list = list(islice(A344001_gen(),40)) # _Chai Wah Wu_, Jun 15 2022

%Y Cf. A011772, A343999 (characteristic function), A344000 (complement).

%Y Cf. also A354919.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Jun 01 2021