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 21-30 of 1190 results. Next

A097683 Numbers k such that R_k + 2 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 2, 3, 5, 9, 11, 24, 84, 221, 1314, 2952, 20016, 51054
Offset: 1

Views

Author

Carl R. White and Julien Peter Benney (jpbenney(AT)ftml.net), Aug 19 2004

Keywords

Comments

Also numbers k such that (10^k + 17)/9 is prime.
The corresponding values R_k + 2 are primes of the form "(n-1) ones followed by a three"; zero is a degenerate case. Related to the base-10 repunit primes.
a(15) > 10^5. - Robert Price, Oct 12 2014
By Kamada link, a(15) > 4*10^5. - Jeppe Stig Nielsen, Jan 17 2023

Examples

			11113 = ((10^5)+17)/9 and 11113 is prime.
		

Crossrefs

Programs

  • Maple
    A097683:=n->`if`((10^n+17 mod 9) = 0 and isprime(floor((10^n+17)/9)),n,NULL): seq(A097683(n), n=0..10^3); # Wesley Ivan Hurt, Oct 12 2014
  • Mathematica
    Do[ If[ PrimeQ[(10^n - 1)/9 + 2], Print[n]], {n, 0, 5951}] (* Robert G. Wilson v, Oct 15 2004 *)

Formula

a(n) = A056654(n-1) + 1.

Extensions

a(11)-a(12) from Robert G. Wilson v, Oct 15 2004
Edited by N. J. A. Sloane, Apr 02 2009, at the suggestion of Farideh Firoozbakht
a(13) from Kamada link by Ray Chandler, Dec 23 2010
a(14) from Robert Price, Oct 12 2014

A256077 Repeat 2^d times the repunit A002275(d); d = 1, 2, 3...

Original entry on oeis.org

1, 1, 11, 11, 11, 11, 111, 111, 111, 111, 111, 111, 111, 111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111
Offset: 1

Views

Author

M. F. Hasler, Mar 21 2015

Keywords

Comments

Yields the length of the n-th (nonempty) binary word (or word over any 2-letter alphabet, like A007931 or A032810 or A032834) in tally mark notation (A000042).

Programs

  • Mathematica
    lim = 5; lst = Table[(10^n - 1)/9, {n, 0, lim}]; Reap@ For[i = 1, i <= lim, i++, Sow@ Table[lst[[i + 1]], {d, 2^i}]] // Flatten // Rest (* Michael De Vlieger, Apr 01 2015 *)
  • PARI
    a(n)=10^#binary(n+1)\90
    
  • Python
    def A256077(n): return (10**((n+1).bit_length()-1)-1)//9 # Chai Wah Wu, Nov 07 2024

Formula

a(n) = A002275(A000523(n+1)) = A032810(n)-A007931(n) = A032834(n)-A032810(n), etc.

A056657 Numbers k such that 60*R_k + 7 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 5, 7, 8, 10, 19, 22, 40, 62, 65, 118, 121, 148, 251, 283, 304, 591, 745, 874, 1203, 1363, 2239, 2402, 5105, 5775, 5812, 12455, 14234, 39605, 55543, 84238, 275921
Offset: 1

Views

Author

Robert G. Wilson v, Aug 09 2000

Keywords

Comments

Also numbers k such that (20*10^k+1)/3 is prime.

Examples

			7, 67, 666667, 66666667, 666666667, 66666666667, etc. are primes.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 60*(10^n - 1)/9 + 7 ], Print[n]], {n, 25556}]

Formula

a(n) = A096507(n) - 1.

Extensions

More terms from Robert G. Wilson v, Oct 22 2003
2239,2402,5105,5775 from Farideh Firoozbakht, Dec 23 2003
39605 and 55543 from Serge Batalov, Jun 2009
84238 from Serge Batalov, Jul 06 2009 confirmed as next term by Ray Chandler, Feb 23 2012
a(33) derived from A096507 by Robert Price, Jul 07 2024

A093671 Primes of the form 10^k + 3*R_k, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

13, 1333333333333333, 133333333333333333333333333333333333333333, 133333333333333333333333333333333333333333333333333333333333333333333333333333333333
Offset: 1

Views

Author

Rick L. Shepherd, Apr 08 2004

Keywords

Crossrefs

Cf. A002275 (repunits), A056698 (corresponding k).

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is ((4*10^n-1) div 3)]; // Vincenzo Librandi, Apr 06 2019
  • Mathematica
    Select[Table[FromDigits[PadRight[{1}, n, 3]], {n, 500}], PrimeQ] (* Vincenzo Librandi, Apr 06 2019 *)

A096506 Numbers n for which 2*R_n + 1 is a prime, where R_n = 11...1 is the repunit (A002275) of length n.

Original entry on oeis.org

1, 2, 3, 8, 11, 36, 95, 101, 128, 260, 351, 467, 645, 1011, 1178, 1217, 2442, 3761, 3806, 15617, 26459, 63117, 88545, 93497
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Comments

Also numbers n such that (2*10^n + 7)/9 is prime.
Per Kamada link, 181457, 202059, 262874 are also terms, found by Rytis Slatkevicius. - Michael S. Branicky, Sep 13 2024

Examples

			n=36: 222222222222222222222222222222222223 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 2(10^n - 1)/9 + 1], Print[n]], {n, 7000}] (* Robert G. Wilson v, Oct 14 2004 *)

Formula

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

Extensions

a(20)-a(24) from Kamada link by Ray Chandler, Feb 27 2012

A204845 Irregular triangle read by rows in which row n lists primitive prime factors of the repunit (10^n - 1)/9 (A002275(n)).

Original entry on oeis.org

1, 11, 3, 37, 101, 41, 271, 7, 13, 239, 4649, 73, 137, 333667, 9091, 21649, 513239, 9901, 53, 79, 265371653, 909091, 31, 2906161, 17, 5882353, 2071723, 5363222357, 19, 52579, 1111111111111111111, 3541, 27961, 43, 1933, 10838689, 23, 4093, 8779, 11111111111111111111111
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2012

Keywords

Examples

			Triangle begins:
1
11
3 37
101
41 271
7 13
239 4649
73 137
333667
9091
...
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    S:= proc(n) option remember;
          `if`(n=1, {1}, S(n-1) union factorset ((10^n-1)/9))
        end:
    T:= n-> sort([(S(n) minus `if`(n=1, {}, S(n-1)))[]])[]:
    seq(T(n), n=1..30);  # Alois P. Heinz, Feb 17 2012
  • Mathematica
    S[n_] := S[n] = If[n==1, {1}, S[n-1] ~Union~ FactorInteger[(10^n-1)/9][[ All, 1]]]; T[n_] := Sort[S[n] ~Complement~ If[n==1, {}, S[n-1]]]; Table[ T[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, Mar 13 2017, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Feb 17 2012

A331863 Numbers k such that R(k) - 10^floor(k/2-1) is prime, where R(k) = (10^k-1)/9 (repunit: A002275).

Original entry on oeis.org

8, 12, 17, 20, 24, 42, 1124, 1169, 1538, 7902, 27617, 29684
Offset: 1

Views

Author

M. F. Hasler, Jan 30 2020

Keywords

Comments

The corresponding primes are a subsequence of A065074: near-repunit primes that contain the digit 0.
In base 10, R(k) - 10^floor(k/2-1) has ceiling(k/2) digits 1, one digit 0 and again floor(k/2-1) digits 1: for even as well as odd k, there is a digit 0 just right of the middle of the repunit of length k.
No term can be congruent to 1 (mod 3). - Chai Wah Wu, Feb 07 2020
a(13) > 50000. - Michael S. Branicky, Jul 23 2024

Examples

			For k = 8,  R(8)  - 10^(4-1) = 11110111 is prime.
For k = 12, R(12) - 10^(6-1) = 111111011111 is prime.
For k = 17, R(12) - 10^(8-1) = 11111111101111111 is prime.
		

Crossrefs

Cf. A002275 (repunits), A011557 (powers of 10), A065074 (near-repunit primes that contain the digit 0), A138148 (Cyclop numbers with digits 0 & 1).
Cf. A331862 (variant with floor(n/2) instead of floor(n/2-1)), A331860 (variant with + (digit 2) instead of - (digit 0)).

Programs

  • PARI
    for(n=2,9999,isprime(p=10^n\9-10^(n\2-1))&&print1(n","))

Extensions

a(7)-a(10) from Giovanni Resta, Jan 31 2020
a(11)-a(12) from Michael S. Branicky, Jul 22 2024

A084832 Numbers k such that 2*R_k - 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

4, 18, 100, 121, 244, 546, 631, 1494, 2566, 8088, 262603, 282948, 359860
Offset: 1

Views

Author

Jason Earls, Jun 05 2003

Keywords

Comments

Also numbers k such that (2*10^k-11)/9 is prime.
Larger values correspond to strong pseudoprimes.
a(11) > 10^5. - Robert Price, Sep 06 2014

Examples

			a(1) = 4 because 2*(10^4-1)/9-1 = 2221 is prime.
a(2) = 18 means that 222222222222222221 is prime.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(2*(10^t-1)/9-1),[$1..1000]); # Robert Israel, Sep 07 2014
  • Mathematica
    Do[ If[ PrimeQ[2(10^n - 1)/9 - 1], Print[n]], {n, 0, 7000}] (* Robert G. Wilson v, Oct 14 2004; fixed by Derek Orr, Sep 06 2014 *)
  • PARI
    for(n=1, 10^4, if(ispseudoprime(2*(10^n-1)/9-1), print1(n,", "))) \\ Derek Orr, Sep 06 2014
    
  • Python
    from sympy import isprime
    def afind(limit):
      n, twoRn = 1, 2
      for n in range(1, limit+1):
        if isprime(twoRn-1): print(n, end=", ")
        twoRn = 10*twoRn + 2
    afind(700) # Michael S. Branicky, Apr 18 2021

Formula

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

Extensions

a(8) from Labos Elemer, Jul 15 2004
a(10) from Kamada data by Robert Price, Sep 06 2014
a(11)-a(13) from Kamada data by Tyler Busby, Apr 29 2024

A093174 Primes of the form 40*R_k + 1, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

41, 4441, 44444444441, 4444444444444444444444444441, 4444444444444444444444444444444444444444444444444444441, 4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444441
Offset: 1

Views

Author

Rick L. Shepherd, Mar 27 2004

Keywords

Comments

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

Crossrefs

Cf. A056681 (corresponding k), A173768.

Extensions

Edited by N. J. A. Sloane, Feb 26 2010

A204846 Irregular triangle read by rows in which row n lists algebraic prime factors of the repunit (10^n - 1)/9 (A002275(n)).

Original entry on oeis.org

1, 1, 1, 11, 1, 3, 11, 37, 1, 11, 101, 3, 37, 11, 41, 271, 1, 3, 7, 11, 13, 37, 101, 1, 11, 239, 4649, 3, 37, 41, 271, 11, 73, 101, 137, 1, 3, 7, 11, 13, 37, 333667, 1, 11, 41, 101, 271, 9091, 3, 37, 239, 4649, 11, 21649, 513239, 1, 3, 7, 11, 13, 37, 73, 101, 137, 9901, 41, 271
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2012

Keywords

Examples

			Triangle begins:
  1;
  1;
  1;
  11;
  1;
  3,11,37;
  1;
  11,101;
  3,37;
  11,41,271;
  ...
		

Crossrefs

Programs

  • Mathematica
    rows[nmax_] := Module[{prim = {1}, r = {{1}}, p, c}, Do[p = FactorInteger[(10^n - 1)/9][[;; , 1]]; c = Complement[p, Complement[p, prim]]; If[c == {}, c = {1}]; AppendTo[r, c]; prim = Union[prim, p], {n, 2, nmax}]; r]; rows[25] // Flatten (* Amiram Eldar, May 11 2024 *)

Extensions

More terms from Amiram Eldar, May 11 2024
Previous Showing 21-30 of 1190 results. Next