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-2 of 2 results.

A262399 Primes that are the concatenation of n 1's, 2*n and n 1's.

Original entry on oeis.org

11411, 111181111, 111111011111, 111111111111112811111111111111
Offset: 1

Views

Author

Altug Alkan, Sep 21 2015

Keywords

Comments

Inspiration was symmetry and visual simplicity.
Generally, the number of 1's is in the center of the 1's. On the other hand, in a(3) the number of 1's is 11. a(3) has an exceptional property because 2*n contains a digit 1 next to the leading string of 1's; this situation also brings about different a perception in terms of symmetry.
a(5) > 10^6000.
Additionally, same visual inspirations can trigger the ideas of similar sequences.
For example, 1111111111111111111111441111111111111111111111 is a semiprime.
a(5) = (n=4847) = "1" x 4847 . 9694 . "1" x 4847. - Dana Jacobsen, Oct 13 2015
a(6) has n > 6000. - Dana Jacobsen, Oct 13 2015
a(6) has n > 10000 if it exists. - Chai Wah Wu, Oct 22 2015

Examples

			a(1) = 11411 because the concatenation of 11, 4 and 11 is a prime number.
a(2) = 111181111 because the concatenation of 1111, 8 and 1111 is a prime number.
a(3) = 111111011111 because the concatenation of 11111, 10 and 11111 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[w = Table[1, {k}]; FromDigits@ Join[w, IntegerDigits[2 k], w], {k, 60}], PrimeQ] (* Michael De Vlieger, Sep 21 2015 *)
    Select[Table[FromDigits[Flatten[Join[{PadRight[{},n,1],IntegerDigits[2n],PadRight[{},n,1]}]]],{n,20}],PrimeQ] (* Harvey P. Dale, Feb 25 2024 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=eval(Str((10^n - 1)/9, 2*n, (10^n - 1)/9))), print1(k", ")))
    
  • Perl
    use ntheory ":all"; for my $n (1..1e5) { my $s=join("", "1" x $n, 2*$n, "1" x $n); say $s if is_prob_prime($s); } # Dana Jacobsen, Oct 13 2015

A263299 Primes that are the concatenation of k 1's, the digits of k^2 + k + 1, and k 1's.

Original entry on oeis.org

131, 11113111, 1111211111, 111113111111, 11111143111111, 11111111111111111111111
Offset: 1

Views

Author

Altug Alkan, Oct 13 2015

Keywords

Comments

Inspiration was a(6) that is concatenation of 10 1's, 10^2 + 10 + 1 and 10 1's. a(6) is R_23 and A004022(3).
k=1, 3, 4, 5, 6, 10 are initial values that generate primes in sequence. The consecutive central polygonal numbers associated with the four consecutive k are 13, 21, 31 and 43.
Note that the middle term of a(2) is 13, not 3.
Next term is too large to include.
The next term has 513 digits. - Harvey P. Dale, Jan 27 2019

Examples

			131 is in the list because 131 is a concatenation of 1, (1^2 + 1 + 1) = 3 and 1, and because 131 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Table[Join[PadRight[{},n,1],IntegerDigits[n^2+n+1],PadRight[{},n,1]],{n,20}],PrimeQ] (* Harvey P. Dale, Jan 27 2019 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=eval(Str((10^n - 1)/9, n^2 + n + 1, (10^n - 1)/9))), print1(k", ")))
    
  • Python
    from gmpy2 import is_prime
    A263299_list = [n for n in (int('1'*k+str(k*(k+1)+1)+'1'*k) for k in range(10**2)) if is_prime(n)] # Chai Wah Wu, Oct 19 2015
Showing 1-2 of 2 results.