A378511
Number of partitions of the repunit A002275(n) into two mutually complementary binary vectors having a common divisor > 1 in base 10.
Original entry on oeis.org
1, 0, 1, 1, 4, 1, 20, 1, 48, 85, 142, 1, 1136, 131, 1780, 6184, 9920, 1, 75434, 1, 124468, 369142, 429508, 1, 4797008, 416966, 6114994, 22482400, 28867896, 111651, 306153842, 384525, 507438240, 1483501078, 1242075014, 743845629, 19710473036, 34300, 17721793660
Offset: 0
a(1) = 0 because there is only one pair {1, 0} of mutually complementary binary vectors of length 1, and GCD(1, 0) = 1.
a(2) = 1 because out of 2 possible pairs of binary vectors of length 2, which are {10, 01} and {11, 00}, only the latter has a common divisor q > 1: q = GCD(11, 0) = 11, whereas the former is coprime, GCD(10, 1) = 1.
a(4) = 4 because out of the 8 possible pairs of mutually complementary binary vectors, exactly 4 are not coprime:
{1000,0111}: GCD(1000, 111) = 1;
{1001,0110}: GCD(1001, 110) = 11;
{1010,0101}: GCD(1010, 101) = 101;
{1011,0100}: GCD(1011, 100) = 1;
{1100,0011}: GCD(1100, 11) = 11;
{1101,0010}: GCD(1101, 10) = 1;
{1110,0001}: GCD(1101, 10) = 1;
{1111,0000}: GCD(1111, 0) = 1111.
The pair {1100010011110, 0011101100001} is counted toward a(13) because in base 10, GCD(1100010011110, 11101100001) = 53. In total, there are 131 such pairs of length 13 that share common prime factors of either 53 or 79. This exemplifies the smallest prime n such that a(n) > 1.
a(317) = 1 because 317 is a term in A004023. Indeed, if any partition of the repunit R_317 into a sum of mutually complementary binary vectors except {R_317, 0} had a nontrivial common divisor q, then the repunit itself would be divisible by q < R_317, which contradicts the fact that R_317 is prime.
-
CountNonCoprimes10[n_] := (Repunit = (10^n - 1)/9; Result = 0; Do[If[!CoprimeQ[#, Repunit-#]
&[FromDigits[IntegerDigits[i, 2]]], Result++], {i, 2^(n-1), 2^n-1}]; Result);
Table[CountNonCoprimes10[n], {n, 0, 25}]
(* Alternative version of the code that uses ParallelSum *)
SubCountNonCoprimes10[n_, k_, totk_] := (Result = 0; Do[If[!CoprimeQ[#, Repunit-#]
&[FromDigits[IntegerDigits[i, 2]]], Result++], {i, #[[k]], #[[k+1]]-1}]
&[Round[Subdivide[2^(n-1), 2^n, totk]]]; Result);
CountNonCoprimes10[n_] := (Repunit = (10^n-1)/9; ParallelSum[SubCountNonCoprimes10[n, k, $KernelCount], {k, $KernelCount}, ProgressReporting -> False]);
Table[CountNonCoprimes10[n], {n, 0, 25}]
A056698
Numbers k such that 10^k + 3*R_k is prime, where R_k = 11...1 is the repunit (A002275) of length k.
Original entry on oeis.org
1, 15, 41, 83, 95, 341, 551, 669, 989, 1223, 6923, 103703
Offset: 1
-
Do[ If[ PrimeQ[ 10^n + 3*(10^n-1)/9], Print[n]], {n, 0, 30470}]
-
for(k=1,1500,if(ispseudoprime(4*(10^k-1)/3+1),print1(k, ", "))) \\ Hugo Pfoertner, Jul 22 2020
A056704
Numbers k such that 3*10^k + 1*R_k is prime, where R_k = 11...1 is the repunit (A002275) of length k.
Original entry on oeis.org
0, 1, 2, 5, 10, 11, 13, 34, 47, 52, 77, 88, 554, 580, 1310, 1505, 8537, 15892, 24022, 27041, 37922, 40033, 134122, 165358, 183760
Offset: 1
-
Do[ If[ PrimeQ[ 3*10^n + (10^n-1)/9], Print[n]], {n, 0, 10000}]
A093165
Primes of the form 70*R_k + 3, where R_k is the repunit (A002275) of length k.
Original entry on oeis.org
3, 73, 773, 77773, 777777773, 777777777773, 777777777777773, 777777777777777777773
Offset: 1
-
Select[Table[FromDigits[PadLeft[{3},n,7]],{n,500}],PrimeQ] (* Harvey P. Dale, Jul 19 2012 *)
A093168
Primes of the form 30*R_k + 7, where R_k is the repunit (A002275) of length k.
Original entry on oeis.org
7, 37, 337, 333337, 3333333333333333333333333333333333333333333337
Offset: 1
A093171
Primes of the form 80*R_k + 7, where R_k is the repunit (A002275) of length k.
Original entry on oeis.org
7, 887, 8887, 888887, 888888887, 888888888887, 888888888888888888888888888888888888888888888888888888888888888888888887
Offset: 1
A093674
Primes of the form 5*10^k + 3*R_k, where R_k is the repunit (A002275) of length k.
Original entry on oeis.org
5, 53, 5333, 53333333333333, 53333333333333333333333333, 53333333333333333333333333333333333333333333333333
Offset: 1
-
[a: n in [0..200] | IsPrime(a) where a is (16*10^n-1) div 3 ]; // Vincenzo Librandi, Apr 07 2019
-
Select[Table[FromDigits[PadRight[{5},n,3]],{n,200}],PrimeQ] (* Harvey P. Dale, Jan 14 2012 *)
A099411
Numbers k such that 3*R_k + 4 is prime, where R_k = 11...1 is the repunit (A002275) of length k.
Original entry on oeis.org
1, 2, 3, 6, 46, 394, 978, 2586, 2811, 2968, 3642, 4827, 4918, 5592, 5706, 10683, 12891, 14118, 74350, 88680, 162138, 279978
Offset: 1
a(21)-a(22) from Kamada data by
Tyler Busby, May 03 2024
A190301
Smallest number h such that n*h is a repunit (A002275), or 0 if no such h exists.
Original entry on oeis.org
1, 0, 37, 0, 0, 0, 15873, 0, 12345679, 0, 1, 0, 8547, 0, 0, 0, 65359477124183, 0, 5847953216374269, 0, 5291, 0, 48309178743961352657, 0, 0, 0, 4115226337448559670781893, 0, 38314176245210727969348659, 0, 3584229390681, 0, 3367, 0, 0, 0, 3, 0, 2849, 0, 271, 0
Offset: 1
For n = 7: a(7) = 15873 because 7 * 15873 = 111111. Repunit 111111 is the smallest repunit with prime factor 7.
Cf.
A050782 = the smallest number h such that n*h is palindromic number,
A083117 = the smallest number h such that n*h is repdigit number.
-
Table[If[GCD[n, 10] > 1, 0, k = MultiplicativeOrder[10, 9*n]; (10^k - 1)/(9*n)], {n, 100}] (* T. D. Noe, May 08 2011 *)
-
a(n)=if(gcd(n,10)>1, 0, (10^znorder(Mod(10,9*n))-1)/9/n) \\ Charles R Greathouse IV, Aug 28 2016
A204847
Primitive cofactor of n-th repunit A002275(n).
Original entry on oeis.org
1, 11, 111, 101, 11111, 91, 1111111, 10001, 333667, 9091, 11111111111, 9901, 1111111111111, 909091, 90090991, 100000001, 11111111111111111, 999001, 1111111111111111111, 99009901, 900900990991, 826446281, 11111111111111111111111, 99990001, 100001000010000100001
Offset: 1
-
lista(nn) = {vf = []; vfs = []; for (n=1, nn, if (n==1, print1(n, ", "), f = factor((10^n-1)/9)[,1]; vkeep = []; for (k = 1, #f~, if (!vecsearch(vfs, f[k]), vkeep = concat(vkeep, f[k]));); print1(prod(j=1, #vkeep, vkeep[j]), ", "); vf = concat(vf, vkeep); vfs = Set(vf);););} \\ Michel Marcus, May 18 2018
Comments