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!)
A276462 Prime numbers that consist of k 2's digits followed by k+1 1's digits for some k >= 1. 0

%I #18 Mar 02 2023 14:01:42

%S 211,22111,2221111,

%T 22222222222222222222222222111111111111111111111111111,

%U 2222222222222222222222222222222221111111111111111111111111111111111

%N Prime numbers that consist of k 2's digits followed by k+1 1's digits for some k >= 1.

%C a(4) is 26 2's followed by 27 1's; a(5) is 33 2's followed by 34 1's.

%C The sequence is conjectured to be infinite.

%C Let b(n) be the sequence of corresponding k's. b(1)-b(8) are 1, 2, 3, 26, 33, 215, 259, 799. - _Felix Fröhlich_, Sep 04 2016

%t Select[FromDigits@ Join[ConstantArray[2, #], ConstantArray[1, # + 1]] & /@ Range@ 36, PrimeQ] (* _Michael De Vlieger_, Sep 04 2016 *)

%t Select[Table[FromDigits[Join[PadRight[{},n,2],PadRight[{},n+1,1]]],{n,40}],PrimeQ] (* _Harvey P. Dale_, Mar 02 2023 *)

%o (PARI) a002275(n) = (10^n-1)/9

%o a011557(n) = 10^n

%o terms(n) = my(i=0, k=1); while(1, my(x=2*a002275(k)*a011557(k+1)+a002275(k+1)); if(ispseudoprime(x), print1(x, ", "); i++); k++; if(i==n, break))

%o /* Print initial five terms as follows: */

%o terms(5) \\ _Felix Fröhlich_, Sep 04 2016

%Y Cf. A000040 (prime numbers).

%K nonn,base

%O 1,1

%A _Bob Selcoe_, Sep 03 2016

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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)