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!)
A157733 a(0)=2, a(1)=3. Then 2 or 22 followed by a string of 3's such that the sum of the digits of a(n) is equal to prime(n). 1

%I #15 Jul 06 2021 10:10:40

%S 2,3,23,223,2333,22333,233333,2233333,23333333,2333333333,22333333333,

%T 2233333333333,23333333333333,223333333333333,2333333333333333,

%U 233333333333333333,23333333333333333333,223333333333333333333

%N a(0)=2, a(1)=3. Then 2 or 22 followed by a string of 3's such that the sum of the digits of a(n) is equal to prime(n).

%C We search for w twos and t threes in prime(n) = 2*w + 3*t. If t = floor(prime(n)/3) would lead to w = 1/2, we decrease t by 1.

%C The number of twos is 3 - A039701(n) if n > 1.

%C If prime(n) is congruent to 1 mod 6, then a(n) starts with 22, but if prime(n) is congruent to 5 mod 6, then a(n) starts with 2. - _Alonso del Arte_, Dec 04 2013

%e a(3) = 23 because the third prime is 5 and 2 + 3 = 5.

%e a(4) = 223 because the fourth prime is 7 and 2 + 2 + 3 = 7.

%e a(5) = 2333 because the fifth prime is 11 and 2 + 3 + 3 + 3 = 11.

%t Module[{nn = 30, t1, t2}, t1 = FromDigits/@Select[Table[PadRight[{2}, n, 3], {n, 2, nn}], PrimeQ[Total[#]] &]; t2 = FromDigits/@ Select[ Table[ PadRight[{2, 2}, n, 3], {n, 2, nn}], PrimeQ[Total[#]] &]; Union[ Join[ {2, 3}, t1, t2]]] (* _Harvey P. Dale_, Mar 06 2013 *)

%Y Cf. A139067, A157966.

%K nonn,base

%O 0,1

%A _Paul Curtz_, Mar 05 2009

%E Edited by _R. J. Mathar_, Mar 15 2009

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 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)