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 11-13 of 13 results.

A309358 Numbers k such that 10^k + 1 is a semiprime.

Original entry on oeis.org

4, 5, 6, 7, 8, 19, 31, 53, 67, 293, 586, 641, 922, 2137, 3011
Offset: 1

Views

Author

Hugo Pfoertner, Jul 29 2019

Keywords

Comments

a(16) > 12000.
10^k + 1 is composite unless k is a power of 2, and it can be conjectured that it is composite for all k > 2, cf. A038371 and A185121. - M. F. Hasler, Jul 30 2019
Suppose k is odd. Then k is a term if and only if (10^k+1)/11 is prime. - Chai Wah Wu, Jul 31 2019

Examples

			a(1) = 4 because 10^4 + 1 = 10001 = 73*137.
		

Crossrefs

Odd terms in sequence: A001562.

Programs

  • Magma
    IsSemiprime:=func; [n: n in [2..200] | IsSemiprime(s) where s is 10^n+1]; // Vincenzo Librandi, Jul 31 2019
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[10^# + 1] == 2 &] (* Vincenzo Librandi, Jul 31 2019 *)

A328455 Least prime p such that all digits of p*prime(n) are the same (or -1 if p does not exist).

Original entry on oeis.org

2, 2, 11, 11, 2, -1, -1, -1, -1, -1, -1, 3, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4649, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Author

Ivan N. Ianakiev, Oct 16 2019

Keywords

Comments

From Bernard Schott, Oct 22 2019: (Start)
Proposition:
For n >= 5, there exist terms a(n) <> -1 iff
* prime(n) is a prime repunit with m 1's and m is in A004023, then a(n) = 2, or
* prime(n) is a divisor of a semiprime repunit with m 1's and m is in A046413, then a(n) is the other prime factor of this semiprime.
Proof:
We must solve a(n) * prime(n) = repdigit = k * repunit, 1<= k <= 9, with a(n) least prime p that is solution.
According to the unicity of prime factorization, only two possibilities:
* prime(n) is repunit, then a(n) = k = 2 (smallest prime).
* prime(n) is not a repunit, then a(n) * prime(n) must be a repunit that is semiprime, then k = 1 and a(n) is the other factor of this semiprime.
Some examples:
Case 1: prime(n) is a repunit.
The first few values of m are 2, 19, 23, ...
If this repunit is the k-th prime, then a(k) = 2; it is the case for prime(5) = 11 with a(5) = 2 (see example).
Case 2: prime(n) is a divisor of repunit.
The first few values of m are 3, 4, 5, 7, 11, 17, 47, 59, 71, ...
For m = 3, 111 = 3 * 37.
As 37 = prime(12), a(12) = 3 with 3 * 37 = 111.
As 3 = prime(2) and a(2) = 2 < 37, 37 is not right here.
For m = 4, 1111 = 11 * 101.
As 101 = prime(26), a(26) = 11 with 11 * 101 = 11111.
As 11 = prime(5) and a(5) = 2 < 101, 101 is not right here.
For m = 5, 11111 = 41 * 271, so as prime(13) = 41 and prime(58) = 271, then a(13) = 271, and (58) = 41.
For m = 7, 1111111 = 239 * 4649, so a(52) = 4649 and a(628) = 239.
(End)
a(n) is positive for n in {1,2,3,4,5,12,13,26,52,58,628,2431,2968,42536,...}. - Ivan N. Ianakiev, Oct 26 2019
If n > 4, a(n) = 2 if A077573(n) = prime(n), A077573(n)/prime(n) if that is prime, otherwise -1. - Robert Israel, Nov 19 2019

Examples

			Prime(5) is 11 and the least prime p such that all the digits of p*prime(5) are the same is 2 (as 2*11 = 22).
a(6) = -1 as repdigits are of the form k*(10^m - 1)/9, 1 <= k <= 9. We need the repdigit to be a semiprime of the form 13*p for some prime p. We need m = 6*t for some t >= 1. So (7*13) || (10^m - 1)/9, i.e., (10^m - 1)/9 can't be a semiprime and a(6) = -1. - _David A. Corneth_, Oct 16 2019
		

Programs

  • Maple
    f:= proc(n) local o,p,q;
      p:= ithprime(n);
      o:= numtheory:-order(10,p);
      q:= (10^o-1)/(9*p);
      if isprime(q) then q elif q = 1 then 2 else -1 fi
    end proc:
    2,2,11,11,seq(f(n),n=5..100); # Robert Israel, Nov 19 2019
  • Mathematica
    a[1]=a[2]=2;a[3]=a[4]=11; a[n_]:= Which[Union[IntegerDigits[Prime[n]]]=={1},2,
    Module[{i=1},While[!Divisible[(10^i-1),9*Prime[n]],i++]; k=(10^i-1)/(9*Prime[n]);
    PrimeQ[k]],k,True,-1]; a/@Range[85] (* Ivan N. Ianakiev, Oct 24 2019 *)
  • PARI
    a(n) = if(n<=5, return([2, 2, 11, 11, 2][n])); my(p=prime(n)); for(i=1, oo, if((10^i-1)/9%p==0, c=(10^i-1)/(9*p); if(isprime(c), return(c), return(-1)))) \\ David A. Corneth, Oct 22 2019

Extensions

More terms from Bernard Schott and David A. Corneth, Oct 22 2019

A046421 Index of smallest repunit having exactly n prime factors (counted with multiplicity).

Original entry on oeis.org

1, 2, 3, 13, 8, 6, 15, 12, 28, 18, 24, 32, 36, 30, 54, 42, 78, 100, 72, 176, 60, 208, 84, 132, 160, 198, 120, 204, 216, 308, 168, 280, 306, 180, 210, 264, 270, 252, 378, 336, 300
Offset: 0

Author

Patrick De Geest, Jul 15 1998

Keywords

Comments

a(40) = 300; all other subsequent terms are > 322. - Ray Chandler, Apr 23 2017
a(41) <= 684, a(42) <= 546, a(43) <= 528, a(44) <= 462, a(45) = 360, a(46) <= 576, a(47) <= 624, a(48) <= 768. - Daniel Suteu, Jan 21 2023

Examples

			For n = 5: R_6 = 111111 = 3*7*11*13*37 is the smallest repunit with five prime factors, so a(5) = 6.
		

Crossrefs

Cf. A086565 (equivalent with distinct prime factors).

Programs

  • PARI
    a(n) = my(k=1); while(bigomega((10^k - 1)/9) !=n, k++); k; \\ Michel Marcus, Apr 23 2017

Extensions

a(1) = 2 inserted and a(19)-a(37) added by Ray Chandler, Apr 23 2017
a(38)-a(40) from Jinyuan Wang, Apr 17 2020
Name corrected by Felix Fröhlich, Jun 04 2022
Previous Showing 11-13 of 13 results.