login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A061022
Primes of the form abbbbb... where a and b are digits.
2
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 199, 211, 233, 277, 311, 433, 499, 577, 599, 677, 733, 811, 877, 911, 977, 1777, 1999, 2111, 2333, 2777, 2999, 4111, 4999, 5333, 7333, 8111, 8999, 23333, 47777
OFFSET
1,1
COMMENTS
Number of terms of n digits: 4, 21, 15, 12, 7, 8, 2, 7, 2, 3, 5, 2, 2, 7, 2, 4, 2, 2, 4, 3, 1, 0, 3, 3, 0, ..., . - Robert G. Wilson v, May 29 2011
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..262 (first 79 terms from Harry J. Smith) (shortened by N. J. A. Sloane, Jan 13 2019)
EXAMPLE
4111 is a member where a=4 and b = 1.
MAPLE
N:= 20:
A:= 2, 3, 5, 7:
for n from 2 to N do
for a from 1 to 9 do
for b in [1, 3, 7, 9] do
p:= a*10^(n-1) + b*(10^(n-1)-1)/9;
if isprime(p) then A:= A, p fi
od
od
od:
A; # Robert Israel, Oct 13 2014
MATHEMATICA
f[n_] := Select[ Union@ Flatten@ Table[ FromDigits@ Join[{a}, Table[b, {n - 1}]], {a, 9}, {b, {1, 3, 7, 9}}], PrimeQ]; Array[f, 5] // Flatten (* Robert G. Wilson v, May 29 2011 *)
PROG
(PARI) { n=r=0; default(primelimit, 1777777777); forprime (p=2, 1777777777, if (p>100, r=p\10; d=p-r*10; while (r>9 && r-r\10*10 == d, r\=10)); if (r<=9, write("b061022.txt", n++, " ", p)) ) } \\ Harry J. Smith, Jul 16 2009
CROSSREFS
Cf. A062353.
Sequence in context: A069682 A069683 A069684 * A238852 A079152 A124590
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 23 2001
EXTENSIONS
Corrected and extended by Dean Hickerson, Jul 10 2001
STATUS
approved