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

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

Original entry on oeis.org

1, 3, 4, 15, 76, 91, 231, 1363, 1714, 1942, 2497, 4963, 5379, 12397, 23224, 26395
Offset: 1

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

For n > 1, the corresponding primes are a subset of A105992: near-repunit primes.
In base 10, R(n) + 4*10^floor(n/2) has ceiling(n/2)-1 digits 1, one digit 5, and again floor(n/2) digits 1, except for n = 0. For odd n, this is a palindrome (a.k.a. wing prime, cf. A077783: subsequence of odd terms), for even n the digit 5 is just left to the middle of the number.
See also the variant A331868 where the digit 5 is just to the right of the middle.

Examples

			For n = 1, R(1) + 4*10^floor(1/2) = 5 is prime.
For n = 3, R(3) + 4*10^floor(3/2) = 151 is prime.
For n = 4, R(4) + 4*10^floor(4/2) = 1511 is prime.
For n = 15, R(15) + 4*10^floor(15/2) = 111111151111111 is prime.
		

Crossrefs

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

Programs

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

Extensions

a(12)-a(14) from Michael S. Branicky, Feb 03 2023
a(15)-a(16) from Michael S. Branicky, Apr 11 2023

A161796 Primes with at least one digit appearing exactly five times in the decimal expansion.

Original entry on oeis.org

101111, 111119, 111121, 111191, 111211, 111611, 112111, 113111, 131111, 199999, 311111, 313333, 323333, 331333, 333233, 333323, 333331, 333337, 333383, 333433, 333533, 334333, 343333, 353333, 444443, 444449, 511111, 555557, 599999, 611111
Offset: 1

Views

Author

Ki Punches, Jun 19 2009

Keywords

Comments

The sequence is probably infinite.

Crossrefs

Programs

  • Maple
    isdgctm := proc(n,d) local dgs,a,i ; dgs := convert(n,base,10) ; a := [seq(0,j=0..9)] ;
    for i in dgs do a := subsop(i+1=op(i+1,a)+1,a) ; od: if convert(a,set) intersect {d} <> {} then true; else false; fi; end:
    for n from 1 to 100000 do p := ithprime(n) ; if isdgctm(p,5) then printf("%d,",p) ; fi; od: # R. J. Mathar, Jun 21 2009

Extensions

Edited and corrected by R. J. Mathar, Jun 21 2009

A177999 Largest n digit prime with the most digits equal to 1.

Original entry on oeis.org

7, 11, 911, 8111, 16111, 911111, 1171111, 71111111, 131111111, 1711111111, 31111111111, 311111111111, 5111111111111, 41111111111111, 111151111111111, 5111111111111111, 11111611111111111, 191111111111111111
Offset: 1

Views

Author

Lekraj Beedassy, May 17 2010

Keywords

Comments

Select first for maximum number of 1's, then take the largest.
In more detail: To get a(n), look at the list of all the n-digit primes. Suppose k is the maximum number of 1's of any number on the list. Throw out any prime on the list that does not contain k 1's. Then a(n) = maximal number that is left on the list. - N. J. A. Sloane, Mar 20 2018

Crossrefs

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

A257937 Primes p such that one digit appears exactly six times together with a single different digit.

Original entry on oeis.org

1111151, 1111181, 1111211, 1111711, 1114111, 1117111, 1171111, 2999999, 3233333, 3331333, 3333133, 3333233, 3333313, 3333331, 3333373, 3333383, 3333433, 3337333, 3353333, 3433333, 3733333, 4999999, 7477777, 7577777, 7727777, 7772777, 7774777, 7777727, 7778777, 7877777, 9899999, 9929999, 9999299, 9999929, 9999991
Offset: 1

Views

Author

K. D. Bajpai, Jul 13 2015

Keywords

Comments

All the terms are congruent to 1 or 2 (mod 3).
In no term does the digit 0, 2, 4, 5, 6, or 8 appear six times.

Examples

			a(1) = 1111151 has exactly six 1's together with a single digit 5.
a(8) = 2999999 has exactly six 9's together with a single digit 2.
		

Crossrefs

Programs

  • Maple
    sort(select(isprime, [seq(seq(seq(d*1111111 + (a-d)*10^k, k=0..6), a={$1..9} minus {d}),d=1..9)])); # Robert Israel, Jul 13 2015
  • Mathematica
    kQ[n_]:= Module[{d=Select[DigitCount[n], # > 0 &]},Length[d] == 2 && Min[d] == 1 && Max[d] == 6]; Select[Table[Prime[n], {n, 1000000}], kQ]
    Select[Prime[Range[80000, 400000]], MemberQ[DigitCount[#], 6] &] (* Vincenzo Librandi, Jul 14 2015 *)
Previous Showing 11-15 of 15 results.