login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061022 Primes of the form abbbbb... where a and b are digits. 2

%I #23 Jan 13 2019 19:23:11

%S 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,

%T 97,199,211,233,277,311,433,499,577,599,677,733,811,877,911,977,1777,

%U 1999,2111,2333,2777,2999,4111,4999,5333,7333,8111,8999,23333,47777

%N Primes of the form abbbbb... where a and b are digits.

%C 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

%H Robert G. Wilson v, <a href="/A061022/b061022.txt">Table of n, a(n) for n = 1..262</a> (first 79 terms from Harry J. Smith) (shortened by _N. J. A. Sloane_, Jan 13 2019)

%e 4111 is a member where a=4 and b = 1.

%p N:= 20:

%p A:= 2,3,5,7:

%p for n from 2 to N do

%p for a from 1 to 9 do

%p for b in [1,3,7,9] do

%p p:= a*10^(n-1) + b*(10^(n-1)-1)/9;

%p if isprime(p) then A:= A,p fi

%p od

%p od

%p od:

%p A; # _Robert Israel_, Oct 13 2014

%t 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 *)

%o (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

%Y Cf. A062353.

%K nonn,base,easy

%O 1,1

%A _Amarnath Murthy_, Jun 23 2001

%E Corrected and extended by _Dean Hickerson_, Jul 10 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:25 EDT 2024. Contains 371964 sequences. (Running on oeis4.)