login
Indices m of repunits R_m that are not Colombian (or self) numbers.
4

%I #62 Sep 18 2021 21:53:25

%S 2,3,5,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,29,30,

%T 31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,

%U 56,57,58,59,60,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77

%N Indices m of repunits R_m that are not Colombian (or self) numbers.

%C Note that 2, 19, 23, 317, 1031, 49081, 86453, 109297, 270343, 5794777, 8177207 (see A004023) are terms. [Last 2 terms added by _Serge Batalov_, Aug 24 2021]

%C While all currently known A004023 terms are in this sequence, there is no clear argument that it would hold for all future values. - _Serge Batalov_, Aug 24 2021

%H David A. Corneth, <a href="/A337139/b337139.txt">Table of n, a(n) for n = 1..10000</a>

%o (PARI) upto(n)= {my(res = List()); for(i = 1, n, if(is(i), listput(res, i); print1(i", "))); res}

%o is(n) = {if(n < 8, return(isprime(n))); qd = n; n = 10^n\9; r = 1 + (n-1)%9; h = (r + 9 * (r%2))/2; ld = 10; while(h + 9*qd >= n % ld, ld*=10); vs = qd - valuation(ld, 10); n %= ld; for(i = 0, qd, if(vs + vecsum(digits(n - h - 9*i)) == h + 9*i, return(1))); 0} \\ _David A. Corneth_, Aug 20 2020

%Y Cf. A002275 (repunits), A004022 (repunit primes), A004023 (indices of repunit primes), A176995 (not Colombian).

%Y Cf. A337208 (complement).

%K nonn,base

%O 1,1

%A _Michel Marcus_, Aug 19 2020