cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-40 of 1190 results. Next

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

Views

Author

Dmytro Inosov, Nov 29 2024

Keywords

Comments

Two binary vectors of length n are mutually complementary if they are obtained from each other by inverting all the individual digits (1->0 and 0->1). The sum of any two mutually complementary binary vectors of length n is a repunit of the same length, A002275(n).
a(n) is the number of distinct unordered pairs of mutually complementary binary vectors of length n that have a common divisor > 1 as integers in base 10.
a(n) is the number of terms m in A007088 of length n that are not coprime with their 1's complement, A002275(n) - m, as integers in base 10.
Equivalently, m from A007088 is counted toward a(A055642(m)) iff GCD(m, A002275(A055642(m)) - m) > 1. Therefore a(n) is the base-10 analog of A378514.
a(n) is the sum of the first two columns, T(n,1) + T(n,2), in the triangle A378761.
For any n > 1, a(n) > 0 because the trivial partition A002275(n) = A002275(n) + 0 always counts toward a(n): GCD(A002275(n), 0) = A002275(n) > 1.
a(n) is nonmonotonic and tends to show minima for prime n, yet there are terms where n is prime yet a(n) > 1, for example a(13) = 131.
The sequence of indices n such that a(n) = 1 is a supersequence of A004023 (indices of prime repunits).

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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}]

Formula

a(n) <= A000325(n-1) = 2^(n-1) - n + 1;
a(A004023(n)) = 1.

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

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (4*10^k-1)/3 is prime.
a(13) > 850000 (from Kamada data). - Robert Price, Oct 19 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 10^n + 3*(10^n-1)/9], Print[n]], {n, 0, 30470}]
  • PARI
    for(k=1,1500,if(ispseudoprime(4*(10^k-1)/3+1),print1(k, ", "))) \\ Hugo Pfoertner, Jul 22 2020

Extensions

a(12) from Kamada data by Robert Price, Oct 19 2014

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

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (28*10^k - 1)/9 is prime.
Although perhaps a degenerate case, A002275 defines R(0)=0. Thus zero belongs in this sequence since 3*10^0 + 0 = 3*1 + 0 = 3 is prime. - Robert Price, Oct 28 2014
a(26) > 2*10^5. - Robert Price, Dec 19 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 3*10^n + (10^n-1)/9], Print[n]], {n, 0, 10000}]

Extensions

Added zero by Robert Price, Oct 28 2014
a(18)-a(25) from Kamada data by Robert Price, Dec 19 2014

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

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

Primes of the form (7*10^k - 43)/9. - Vincenzo Librandi, Nov 16 2010
The next term, a(9), has 264 digits. - Harvey P. Dale, Jul 19 2012

Crossrefs

Cf. A056689 (corresponding k), A099420.

Programs

  • Mathematica
    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

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

Primes of the form (3*10^k + 33)/9. - Vincenzo Librandi, Nov 16 2010

Crossrefs

Cf. A056680 (corresponding k), A099411, A173766.

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

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

Primes of the form (8*10^k - 17)/9. - Vincenzo Librandi, Nov 16 2010

Crossrefs

Cf. A056695 (corresponding k), A096846.

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

Views

Author

Rick L. Shepherd, Apr 08 2004

Keywords

Crossrefs

Cf. A002275, A056714 (corresponding k).

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is (16*10^n-1) div 3 ]; // Vincenzo Librandi, Apr 07 2019
  • Mathematica
    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

Views

Author

Robert G. Wilson v, Oct 14 2004

Keywords

Comments

Also numbers k such that (10^k + 11)/3 is prime.
a(21) > 10^5. - Robert Price, Nov 02 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 3(10^n - 1)/9 + 4], Print[n]], {n, 10000}]

Formula

a(n) = A056680(n) + 1.

Extensions

a(16)-a(20) from Robert Price, Nov 02 2014
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

Views

Author

Jaroslav Krizek, May 07 2011

Keywords

Examples

			For n = 7: a(7) = 15873 because 7 * 15873 = 111111. Repunit 111111 is the smallest repunit with prime factor 7.
		

Crossrefs

Cf. A084681 (repunit length), A216479 (the repunit).
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.

Programs

  • Mathematica
    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 *)
  • PARI
    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

Views

Author

N. J. A. Sloane, Jan 19 2012

Keywords

Comments

Except for a(1) = 1 and a(3) = 111, this is the Zsigmondy numbers for a = 10, b = 1: Zs(n, 10, 1) is the greatest divisor of 10^n - 1^n that is coprime to 10^m - 1^m for all positive integers m < n. The prime terms are called unique primes or unique period primes (A007615).
Differs from A019328 for n = 1, 9, 22, 27, 42, ... - Jianing Song, Apr 30 2018

Crossrefs

Programs

  • PARI
    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

Formula

Equals A002275(n)/(product of terms in n-th row of A204845).

Extensions

a(11)-a(24) from Jianing Song, Apr 30 2018
a(25) from Jinyuan Wang, May 02 2021
Previous Showing 31-40 of 1190 results. Next