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.

Showing 1-9 of 9 results.

A185684 Irregular triangle, read by rows, of primes with prefix n and digits "3" appended, otherwise 0.

Original entry on oeis.org

13, 23, 233, 2333, 23333, 0, 43, 433, 53, 0, 73, 733, 7333, 83, 0, 103, 1033, 10333, 103333, 113, 0, 0, 0, 0, 163, 173, 1733, 17333, 0, 193, 1933, 19333, 0, 0, 223, 233, 2333, 23333, 0, 0, 263, 2633, 0, 283, 2833, 293, 0, 313, 0, 0, 0, 353, 3533, 0, 373, 3733, 383, 3833, 38333
Offset: 1

Views

Author

Michel Lagneau, Feb 10 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			In row n=2, for k=1..4, a(2,k) = {23, 233, 2333, 23333} are in the table.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:a1:=a0*10+3:if type(a1,prime)=true then a0:=a1:printf(`%d, `,a0):c:=c+1:else
      id:=1:fi:od:if c=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    Reap[Do[cnt = 0; d = IntegerDigits[n]; While[p = FromDigits[AppendTo[d, 3]]; PrimeQ[p], cnt++; Sow[p]]; If[cnt == 0, Sow[0]], {n, 61}]][[2, 1]] (* T. D. Noe, Feb 10 2011 *)

A185685 Irregular triangle, read by rows, of primes with prefix n and digits "7" appended, otherwise 0.

Original entry on oeis.org

17, 0, 37, 47, 0, 67, 677, 0, 0, 97, 977, 107, 0, 127, 1277, 137, 0, 157, 167, 0, 0, 197, 0, 0, 227, 0, 0, 257, 0, 277, 2777, 0, 0, 307, 317, 0, 337, 347, 0, 367, 3677, 0, 0, 397, 0, 0, 0, 0, 0, 457, 467, 0, 487, 4877, 0, 0, 0, 0, 0, 547, 5477, 557, 0, 577, 587, 0, 607, 617, 0, 0
Offset: 1

Views

Author

Michel Lagneau, Feb 10 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			for k=1..2 , a(12,k) = {127, 1277} are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:a1:=a0*10+7:if type(a1,prime)=true then a0:=a1:printf(`%d, `,a0):c:=c+1:else
      id:=1:fi:od:if c=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    Reap[Do[cnt = 0; d = IntegerDigits[n]; While[p = FromDigits[AppendTo[d, 7]]; PrimeQ[p], cnt++; Sow[p]]; If[cnt == 0, Sow[0]], {n, 61}]][[2, 1]]

A185687 Irregular triangle, read by rows, of primes with prefix n and digits "9" appended, otherwise 0.

Original entry on oeis.org

19, 199, 1999, 29, 0, 0, 59, 599, 0, 79, 89, 0, 109, 0, 0, 139, 1399, 13999, 139999, 1399999, 149, 1499, 0, 0, 179, 0, 199, 1999, 0, 0, 229, 239, 2399, 0, 0, 269, 2699, 0, 0, 0, 0, 0, 0, 0, 349, 3499, 359, 0, 379, 389, 0, 409, 4099, 419, 0, 439, 449, 0, 0, 479, 4799, 0, 499, 4999, 49999, 509, 5099, 0, 0, 0, 0, 0, 569, 0, 0, 599, 0, 619
Offset: 1

Views

Author

Michel Lagneau, Feb 10 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			for k = 1..6, a(608, k) = { 6089, 60899, 608999,6089999,60899999,608999999}
  are in the sequence.
19,199,1999;
29;
0;
0;
59,599;
0;
79;
89;
0;
109;
0;
0;
139,1399,13999,139999,1399999;
149,1499;
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:a1:=a0*10+9:if type(a1,prime)=true then a0:=a1:printf(`%d, `,a0):c:=c+1:else
      id:=1:fi:od:if c=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    Reap[Do[cnt = 0; d = IntegerDigits[n]; While[p = FromDigits[AppendTo[d, 9]]; PrimeQ[p], cnt++; Sow[p]]; If[cnt == 0, Sow[0]], {n, 61}]][[2, 1]]

A186069 a(n) is the smallest prefix such that the numbers with k digits "3" appended are primes for k = 1..n.

Original entry on oeis.org

1, 2, 2, 2, 2177, 16109, 1100318, 1315351, 74810500, 1130720467, 103273582897, 1587865798465
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

See A186070 for the digit "9" case. The corresponding sequences with the digits "1" or "7" are not possible because if nX and nXX are prime, then nXXX will be a multiple of 3 when X is 1 or 7.
Any term after a(7) is congruent to 2 (mod 7). - Jonathan Pappas, Oct 17 2021
a(13) is greater than 3*10^12. - Jonathan Pappas, Oct 19 2021
When a'(n) is the smallest prefix as in the Name but not for k = n+1, then the data becomes: 1, 26, 17, 2, 2177, 16109, ... In this case, a'(2) = 26 because 263 and 2633 are primes, while 26333 is divisible by 17. - Bernard Schott, Nov 18 2021

Examples

			a(4) = 2 because 23, 233, 2333, 23333 are primes and 133 is not a prime number.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 10 do: idd:=0:for k from 1 to 1000000 while(idd=0)
      do:a0:=k:id:=0:ite:=0:for u from 1 to n do:a1:=a0*10+3:if type(a1,prime)=true
      then ite:=ite+1:a0:=a1:else fi:od:if ite =n then idd:=1:print(k):else fi:od:od:
  • Mathematica
    m=1; Table[While[d=IntegerDigits[m]; k=0; While[k++; AppendTo[d, 3]; k <= n && PrimeQ[FromDigits[d]]]; k <= n, m++]; m, {n, 6}]
  • PARI
    isok(k, n) = my(sj=Str(k)); for(j=1, n, if (!isprime(eval(sj=concat(sj, Str(3)))), return(0))); return(1);
    a(n) = my(k=1); while (!isok(k,n), k++); k; \\ Michel Marcus, Oct 18 2021
    
  • Python
    from sympy import isprime
    def a(n):
        prefix = 1
        while not all(isprime(int(str(prefix) + "3"*k)) for k in range(1, n+1)):
            prefix += 1
        return prefix
    print([a(n) for n in range(9)]) # Michael S. Branicky, Nov 18 2021

Extensions

a(10)-a(12) from Jonathan Pappas, Oct 19 2021

A186070 a(n) is the smallest prefix such that the numbers with k digits "9" appended are primes for k = 1, 2, ..., n.

Original entry on oeis.org

1, 1, 1, 13, 13, 608, 4094, 1875397, 143639306, 5613099946, 20207317759, 1474035260669
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

See A186069 for the digit "3" case. The corresponding sequences with the digits "1" or "7" are not possible because if nX and nXX are prime, then nXXX will be a multiple of 3 when X is 1 or 7.
323399992 is prime if you add up to eight "9"s to it. This one is noteworthy since it contains a string of four "9"s to begin with. It also only contains three unique digits. - Jonathan Pappas, Oct 13 2021
Any term after a(7) is congruent to 6 (mod 7). - Jonathan Pappas, Oct 19 2021
When a'(n) is the smallest prefix as in the Name but not for k = n+1, then the data becomes: 2, 5, 1, 104, 13, 608, 4094, ... In this case, a'(2) = 5 because 59 and 599 are primes while 5999 = 7*857. - Bernard Schott, Nov 19 2021

Examples

			a(6) = 608 because 6089, 60899, 608999, 6089999, 60899999 and 608999999 are primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 10 do: idd:=0:for k from 1 to 1000000 while(idd=0)
      do:a0:=k:id:=0:ite:=0:for u from 1 to n do:a1:=a0*10+9:if type(a1,prime)=true
      then ite:=ite+1:a0:=a1:else fi:od:if ite =n then idd:=1:print(k):else fi:od:od:
  • Mathematica
    m=1; Table[While[d=IntegerDigits[m]; k=0; While[k++; AppendTo[d, 9]; k <= n
      && PrimeQ[FromDigits[d]]]; k <= n, m++]; m, {n, 8}]
  • PARI
    isok(k, n) = my(sj=Str(k)); for(j=1, n, if (!isprime(eval(sj=concat(sj, Str(9)))), return(0))); return(1);
    a(n) = my(k=1); while (!isok(k,n), k++); k; \\ Michel Marcus, Oct 18 2021
    
  • Python
    from sympy import isprime
    def a(n):
        prefix = 1
        while not all(isprime(int(str(prefix) + "9"*k)) for k in range(1, n+1)):
            prefix += 1
        return prefix
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Nov 19 2021

Extensions

a(9) from Jonathan Pappas, Oct 13 2021
a(10)-a(11) from Jonathan Pappas, Oct 19 2021
a(12) from Jonathan Pappas, Jul 13 2023

A186071 Irregular triangle, read by rows, of primes with suffix n and digits "3" prepended , otherwise 0.

Original entry on oeis.org

31, 331, 3331, 33331, 333331, 3333331, 33333331, 0, 0, 0, 0, 0, 37, 337, 0, 0, 0, 311, 0, 313, 3313, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 3331, 33331, 333331, 3333331, 33333331, 0, 0, 0, 0, 0, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 347, 3347, 33347, 0, 349, 0, 0, 0, 353
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			for k=1..7 , a(1, k) = {31, 331, 3331, 33331, 333331, 3333331, 33333331} are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:d:=length(a0):a1:=3*10^d+a0:if type(a1, prime)=true then a0:=a1:printf(`%d,
      `, a0):c:=c+1:else id:=1:fi:od:if c=0 then printf(`%d, `, 0):else fi:od:

A186072 Irregular triangle, read by rows, of primes with suffix n and digits "1" prepended , otherwise 0.

Original entry on oeis.org

11, 0, 13, 113, 0, 0, 0, 17, 0, 19, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 131, 0, 0, 0, 0, 0, 137, 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, 151, 1151, 0, 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, 163, 1163, 0, 0, 0, 167, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 179
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			for k=1..2 , a(3, k) = {13, 113} are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:d:=length(a0):a1:=10^d+a0:if type(a1, prime)=true then a0:=a1:printf(`%d,
      `, a0):c:=c+1:else id:=1:fi:od:if c=0 then printf(`%d, `, 0):else fi:od:

A186073 Irregular triangle, read by rows, of primes with suffix n and digits "7" prepended, otherwise 0.

Original entry on oeis.org

71, 0, 73, 773, 0, 0, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 719, 0, 0, 0, 0, 0, 0, 0, 727, 7727, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 739, 0, 0, 0, 743, 0, 0, 0, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 757, 7757, 0, 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 773
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

Row n ends when a composite number is found.

Examples

			for k=1..2 , a(3, k) = {73, 773} are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:d:=length(a0):a1:=7*10^d+a0:if type(a1, prime)=true then a0:=a1:printf(`%d,
      `, a0):c:=c+1:else id:=1:fi:od:if c=0 then printf(`%d, `, 0):else fi:od:

A186075 Irregular triangle, read by rows, of primes with suffix n and digits "9" prepended, otherwise 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 97, 997, 0, 0, 0, 911, 0, 0, 0, 0, 0, 0, 0, 919, 0, 0, 0, 0, 0, 0, 0, 0, 0, 929, 9929, 99929, 0, 0, 0, 0, 0, 0, 0, 937, 0, 0, 0, 941, 9941, 0, 0, 0, 0, 0, 947, 0, 0, 0, 0, 0, 953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 967, 9967, 0, 0, 0, 971, 0, 0, 0, 0, 0, 977
Offset: 1

Views

Author

Michel Lagneau, Feb 11 2011

Keywords

Comments

Row n ends when a composite number is found. ~

Examples

			for k=1..3 , a(29, k) = {929, 9929,99929} are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
      while (id=0) do:d:=length(a0):a1:=9*10^d+a0:if type(a1, prime)=true then a0:=a1:printf(`%d,
      `, a0):c:=c+1:else id:=1:fi:od:if c=0 then printf(`%d, `, 0):else fi:od:
Showing 1-9 of 9 results.