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!)
A109370 Numbers n such that the string 22n is the decimal expansion of a prime number. 1

%I #19 Sep 08 2022 08:45:19

%S 3,7,9,13,21,37,39,43,51,67,69,73,81,87,93,97,109,111,123,129,133,147,

%T 153,157,159,171,189,193,229,247,259,271,273,277,279,283,291,303,307,

%U 343,349,367,369,381,391,397,409,433,441,447,453,469,481,483,501,511

%N Numbers n such that the string 22n is the decimal expansion of a prime number.

%H Vincenzo Librandi, <a href="/A109370/b109370.txt">Table of n, a(n) for n = 1..2000</a>

%e 3 is in the sequence because 223 is prime.

%e 67 is in the sequence because 2267 is prime.

%e 111 is in the sequence because 22111 is prime.

%p a:= proc(n) local k; for k from 1 +`if`(n=1, 0, a(n-1))

%p while not isprime(parse(""||22||k)) do od; a(n):=k

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 30 2014

%t Select[Range[700], PrimeQ[22 10^IntegerLength[#] + #] &] (* _Vincenzo Librandi_, Jul 30 2014 *)

%o (Magma) [ n: n in [1..600] | IsPrime(Seqint(Intseq(n) cat [2, 2])) ]; // _Klaus Brockhaus_, Feb 03 2011

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Aug 24 2005

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 23 12:27 EDT 2024. Contains 371912 sequences. (Running on oeis4.)