login
Numbers k such that gcd(k, R_k) = 1, where R_k is the repunit (10^k -1)/9 = A002275(k).
2

%I #23 May 09 2024 09:07:43

%S 1,2,4,5,7,8,10,11,13,14,16,17,19,20,23,25,26,28,29,31,32,34,35,37,38,

%T 40,41,43,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,68,70,71,73,74,

%U 76,77,79,80,82,83,85,86,89,91,92,94,95,97,98,100,101,103,104,106,107

%N Numbers k such that gcd(k, R_k) = 1, where R_k is the repunit (10^k -1)/9 = A002275(k).

%H T. D. Noe, <a href="/A119905/b119905.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Range[1000], GCD[#, (10^# - 1)/9] == 1&] (* _Jean-François Alcover_, May 19 2016 *)

%o (PARI) upto(N) = [n|n<-[1..N], 1==gcd(n, (10^n-1)/9)]; \\ _Ruud H.G. van Tol_, May 09 2024

%Y Cf. A002275, A119888.

%K nice,nonn

%O 1,2

%A _Lekraj Beedassy_, Aug 03 2006