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

A332115 a(n) = (10^(2n+1)-1)/9 + 4*10^n.

Original entry on oeis.org

5, 151, 11511, 1115111, 111151111, 11111511111, 1111115111111, 111111151111111, 11111111511111111, 1111111115111111111, 111111111151111111111, 11111111111511111111111, 1111111111115111111111111, 111111111111151111111111111, 11111111111111511111111111111, 1111111111111115111111111111111
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

See A107125 = {0, 1, 7, 45, 115, 681, 1248, ...} for the indices of primes.

Crossrefs

Cf. (A077783-1)/2 = A107125: indices of primes; A331868 & A331869 (non-palindromic variants).
Cf. A002275 (repunits R_n = (10^n-1)/9), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332125 .. A332195 (variants with different repeated digit 2, ..., 9).
Cf. A332112 .. A332119 (variants with different middle digit 2, ..., 9).

Programs

  • Maple
    A332115 := n -> (10^(2*n+1)-1)/9+4*10^n;
  • Mathematica
    Array[(10^(2 # + 1)-1)/9 + 4*10^# &, 15, 0]
  • PARI
    apply( {A332115(n)=10^(n*2+1)\9+4*10^n}, [0..15])
    
  • Python
    def A332115(n): return 10**(n*2+1)//9+4*10**n

Formula

a(n) = A138148(n) + 5*10^n = A002275(2n+1) + 4*10^n.
G.f.: (5 - 404*x + 300*x^2)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2.

A331866 Numbers k for which R(k) + 3*10^floor(k/2) is prime, where R(k) = (10^k-1)/9 (repunit: A002275).

Original entry on oeis.org

0, 2, 5, 7, 8, 10, 65, 91, 208, 376, 586, 2744, 3089, 19378, 20246
Offset: 1

Views

Author

M. F. Hasler, Jan 30 2020

Keywords

Comments

The corresponding primes are a subset of the near-repunit primes A105992 (at least when they have k > 2 digits).
In base 10, R(k) + 3*10^floor(k/2) has k digits all of which are 1 except for one digit 4 (for k > 0) located in the center (for odd k) or just to the left of it (for even k): i.e., there are ceiling(k/2)-1 digits 1 to the left and floor(k/2) digits 1 to the right of the digit 4. For odd k, this is a palindrome a.k.a. wing prime, cf. A077780, the subsequence of odd terms.
a(14) = 19378 was found by Amiram Eldar, verified to be the 14th term in collaboration with the author of the sequence and factordb.com. The term a(13) = 3089 corresponds to a certified prime (Ivan Panchenko, 2011, cf. factordb.com); a(12) and a(14) are only PRP as far as we know.

Examples

			For n = 0, R(0) + 3*10^floor(0/2) = 3 is prime.
For n = 2, R(2) + 3*10^floor(2/2) = 41 is prime.
For n = 5, R(5) + 3*10^floor(5/2) = 11411 is prime.
For n = 7, R(7) + 3*10^floor(7/2) = 1114111 is prime.
For n = 8, R(8) + 3*10^floor(8/2) = 11141111 is prime.
		

Crossrefs

Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
Cf. A331862, A331861, A331865, A331869 (variants with digit 0, 2, 3 or 5 instead of 4), A331867 (variant with floor(n/2-1) instead of floor(n/2)).
Cf. A077780 (odd terms).

Programs

  • Mathematica
    Select[Range[0, 2500], PrimeQ[(10^# - 1)/9 + 3*10^Floor[#/2]] &]
  • PARI
    for(n=0,9999,ispseudoprime(p=10^n\9+3*10^(n\2))&&print1(n","))

Extensions

a(15) from Michael S. Branicky, Sep 24 2024

A331868 Numbers k for which R(k) + 4*10^floor(k/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).

Original entry on oeis.org

4, 147, 270, 1288, 1551, 3427
Offset: 1

Views

Author

M. F. Hasler, Jan 30 2020

Keywords

Comments

The corresponding primes are a subsequence of A105992: near-repunit primes.
In base 10, R(n) + 4*10^floor(n/2-1) has ceiling(n/2) digits 1, one digit 5, and again floor(n/2-1) digits 1. For odd and even n as well, the digit 5 appears just to the right of the middle of the number.
a(7) > 10^4. - Daniel Suteu, Feb 10 2020
a(7) > 5*10^4. - Michael S. Branicky, Nov 02 2024

Examples

			For n = 4, R(4) + 4*10^floor(4/2-1) = 1151 is prime.
For n = 5, R(5) + 4*10^floor(5/2-1) = 11151 =  3^3*7*59 is not prime.
For n = 147, R(147) + 4*10^72 = 1(74)51(72) is prime, where (.) indicates how many times the preceding digit is repeated.
		

Crossrefs

Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
Cf. A331863, A331860, A331864, A331867 (variants with digit 0, 2, 3 resp. 4 instead of 5), A331869 (variant with floor(n/2) instead of floor(n/2-1)).

Programs

  • Mathematica
    Select[Range[2, 2500], PrimeQ[(10^# - 1)/9 + 4*10^Floor[#/2 - 1]] &]
  • PARI
    for(n=2,9999,isprime(p=10^n\9+4*10^(n\2-1))&&print1(n","))

Extensions

a(6) from Daniel Suteu, Feb 10 2020
Showing 1-3 of 3 results.