"Squares containing at most three distinct digits"
[ Patrick De Geest ]

N.J.A. Sloane (2001), Part of the
On-Line Encyclopedia of Integer Sequences

```
```
LEGEND
palegreen bgcolor indicating finished sequence
no bgcolor indicating that sequence needs more terms
References
Hisanori Mishima's website
0 1 2A058411A058412SourceThree infinite patterns
1(0n)1 2 = 1(0n)2(0n)1  [n>=0]
1(0n)11 2 = 1(0n)22(0n-1)121  [n>=1]
11(0n)1 2 = 121(0n-1)22(0n)1  [n>=1]
10099510939154979751 2 =
102000121210111101102120011101220022001
0 1 3
Source
( No rootsolutions less than 10 24
info from Hisanori Mishima's website )
0 1 4A058413A058414Source
Six infinite patterns
1(0n)2 2 = 1(0n)4(0n)4  [n>=0]
2(0n)1 2 = 4(0n)4(0n)1  [n>=0]
102(0n)201 2 =
10404(0n-2)41004(0n-2)40401  [n>=2]
1(0n)202(0n)1 2 =
1(0n)404(0n-2)41004(0n-2)404(0n)1  [n>=2]
201(0n)102 2 =
40401(0n-2)41004(0n-2)10404  [n>=2]
2(0n)101(0n)2 2 =
4(0n)404(0n-2)11001(0n-2)404(0n)4  [n>=2]

3180252254777039538502 2 =
10114004404014444004140001011411401140404004
0 1 5A058415A058416Source23452400954944999 2 =
550015110551505101015151115110001
0 1 6A058417A058418Source
Three infinite patterns
1(0n)3(0n)1 2 = 1(0n)6(0n-1)11(0n)6(0n)1  [n>=1]
1(0n)8(0n)1 2 =
1(0n-1)16(0n-1)66(0n-1)16(0n)1  [n>=1]
4(0n)127(0n+2)4 2 =
16(0n-1)1016(0n-2)16161(0n-1)1016(0n+1)16
[n>=2]

12649351807945204 2 =
160006101161166601100660666601616
0 1 7A058419A058420Source8427200114569499 2 =
71017701771000177071770101111001
0 1 8A058421A058422Source
Four infinite patterns
9(0n)1 2 = 81(0n-1)18(0n)1  [n>=1]
1(0n+1)9 2 = 1(0n)18(0n)81  [n>=0]
1(0n)4(0n)1 2 = 1(0n)818(0n)8(0n)1  [n>=1]
1(0n+1)9(0n)1 2 =
1(0n)18(0n-1)101(0n-1)18(0n)1  [n>=1]

331680389653656009 2 =
110011880880801080101881180101808081
0 1 9A058473A058474Source43694278824566964251 2 =
1909190001999001011109190090109911991001
0 2 3---combination impossible
0 2 4A058423A058424Source
One infinite pattern
2(0n)6(0n)2 2 =
4(0n-1)24(0n-1)44(0n-1)24(0n)4  [n>=1]

1562062816343832 2 =
2440040242204024220420044444224
0 2 5A058425A058426Source
Four infinite patterns
5(0n)5 2 = 25(0n-1)5(0n)25  [n>=1]
5(0n+1)505 2 = 25(0n)505(0n-1)255025  [n>=1]
505(0n+2)5 2 = 255025(0n-1)505(0n+2)25  [n>=1]
15(0n+2)85(0n)15 2 =
225(0n)255(0n)52225(0n-2)255(0n)225
[n>=2]
Farideh Firoozbakht's intricate patterns

44949994999999949999995 2 =
2020502050500020505000050500052500000500000025
0 2 6---combination impossible
0 2 7---combination impossible
0 2 8---combination impossible
0 2 9A058427A058428Source149067065510873088673 2 =
22220990020022929092929022220290920900929
0 3 4A058429A058430Source20832739723817975138362 2 =
434003044400343443044430000434430333044043044
0 3 5---combination impossible
0 3 6A058431A058432Source25107103902348156 2 =
630366666363306003336330636600336
0 3 7---combination impossible
0 3 8---combination impossible
0 3 9A058433A058434Source969071253 2 =
939099093390990009
0 4 5A058435A058436Source6674983479713230005962 2 =
44555404454444540454555540045000554555545444
0 4 6A058437A058438Source
One infinite pattern
8(0n)254(0n+2)8 2 =
64(0n-1)4064(0n-2)64644(0n-1)4064(0n+1)64
[n>=2]

2542962918459579238 2 =
6466660404660460644444606044000660644
0 4 7A058439A058440Source2010988315424552 2 =
4044074004774077447400004400704
0 4 8A058441A058442Source
Five infinite patterns
2(0n)2 2 = 4(0n)8(0n)4  [n>=0]
2(0n)2(0n-1)2 2 =
4(0n)8(0n-1)84(0n-1)8(0n-1)4  [n>=1]
2(0n-1)2(0n)2 2 =
4(0n-1)8(0n-1)48(0n-1)8(0n)4  [n>=1]
2(0n)22 2 =
4(0n)88(0n-1)484  [n>=1]
22(0n)2 2 =
484(0n-1)88(0n)4  [n>=1]

20199021878309959502 2 =
408000484840444404408480044404880088004
0 4 9A058443A058444SourceTwo infinite patterns
(9n)7 2 = (9n)4(0n)9  [n>=1]
2(0n)1(0n)2 2 = 4(0n)4(0n)9(0n)4(0n)4  [n>=0]
3015775265159011230138 2 =
9094900449944904494440090444449999999499044
0 5 6A058445A058446Source2236081408416666 2 =
5000060065066660656065066555556
0 5 7---combination impossible
0 5 8---combination impossible
0 5 9A058447A058448Source771395165003 2 =
595050500590005595990009
0 6 7A058449A058450Source26012881552428213576 2 =
676670006660660066767076066770670707776
0 6 8---combination impossible
0 6 9A058451A058452Source30000101109940614 2 =
900006066606660060090966606696996
0 7 8---combination impossible
0 7 9A058453A058454Source8819172285373497 2 =
77777799799099990007000790009009
0 8 9A058455A058456Source301345331969667 2 =
90809009099908808089808090889
1 2 3A030175A030174Source557963558954625926861 2 =
311323333121312322332133323111223321313321
1 2 4A053880A053881SourceOne infinite pattern
(3n)8 2 = (1n)4(2n-1)44  [n>=1]
379766258564954821662 2 =
144222411144424121442444112111142224442244
1 2 5A031153A031153Source
Three infinite patterns
(3n)5 2 = (1n)(2n+1)5  [n>=0]
123(3n)5 2 = 152(1n)5(2n+2)5  [n>=0]
(3n)504485 2 =
(1n)2251(2n-4)51515115225  [n>=4]

1102340925268369741032335 2 =
1215155515521525522215211555521512552151515552225
1 2 6A053882A053883Source47130268582155593596 2 =
2221262216626122626662262611111116211216
1 2 7A053884A053885Source130834904430015239 2 =
17117772217211221211117217772227121
1 2 8A053886A053887SourceOne infinite pattern
(3n)59 2 = (1n)28(2n-1)881  [n>=1]
34377642169166984891 2 =
1181822281111288118221882821111822281881
1 2 9A053888A053889Source459556524411439511 2 =
211192199129121999192121999211919121
1 3 4A053890A053891Source21079405433537116521 2 =
444341333431434111311131411343131143441
1 3 5---impossible since all 3 digits odd
1 3 6A053892A053893Source18266544874814631 2 =
333666661663616663311166611666161
1 3 7---impossible since all 3 digits odd
1 3 8A053894A053895Source286074095527510693610891 2 =
81838388131883313833383381811133318888113813881
1 3 9---impossible since all 3 digits odd
1 4 5A053896A053897Source735604795060122 =
5411144145154411455544144144
1 4 6A027677A027676Source 1
Source 2
10789398111648380852704 2 =
116411111611641646616166611414441166144111616
1 4 7A053898A053899Source2177492084289725902412 2 =
4741471777144414774147714111744447747417744
1 4 8A053900A053901Source1346900557360669225841779 2 =
1814141111418481411488184148411114184811141884841
1 4 9A027675A006716 *Source 1
Source 2
Source 3
(* seq by njas)
648070211589107021 2 =
419994999149149944149149944191494441
1 5 6A053902A053903SourceOne infinite pattern
(3n)4 2 = (1n+1)(5n)6  [n>=0]
74240565428619726479296 2 =
5511661555161166511651661611666516615516655616
1 5 7---impossible since all 3 digits odd
1 5 8A053904A053905Source2412237158970509643109 2 =
5818888111118115811551585855811558551185881
1 5 9---impossible since all 3 digits odd
1 6 7A053906A053907Source1292931424 2 =
1671671667166667776
1 6 8A053908A053909Source1080794204132598414568541 2 =
1168116111686616811868118886618818666111186868681
1 6 9A053910A053911Source34149670012924966713187 2 =
1166199961991666696199696161116991961919696969
1 7 8A053912A053913Source279067891 2 =
77878887787187881
1 7 9---impossible since all 3 digits odd
1 8 9A053914A053915Source2969848344609859 2 =
8819999189981919818818919999881
2 3 4A053916A053917Source205483392086668 2 =
42223424423443333243223342224
2 3 5A053918A053919Source159789024443333515 2 =
25532532332552235533223325522255225
2 3 6A058457A058458Source2514602599284156 2 =
6323226232326633633323632632336
2 3 7---combination impossible
2 3 8---combination impossible
2 3 9A053920A053921Source14940646884386874573 2 =
223222929323939222223332232999233932329
2 4 5A031154A031152SourceThree infinite patterns
(6n)5 2 = (4n)(2n+1)5  [n>=0]
(6n)515 2 = (4n)24(2n-1)45225  [n>=1]
2(3n)5 2 = 5(4n-1)5(2n+1)5  [n>=1]
473545618135383472428338 2 =
224245452455222424254455242452522555442545442244
2 4 6A053922A053923SourceOne infinite pattern
(6n)8 2 = (4n)6(2n)4  [n>=0]
1562826497869300353470568 2 =
2442426662442422262266222264624646466242442242624
2 4 7A058459A058460Source47146022358675418 2 =
2222747424244722424422447477474724
2 4 8A027679A027678Source 1
Source 2
Source 3
2069416058768323727702022 2 =
4282482824288222284288288882288482848444822888484
2 4 9A053924A053925Source547259530974381470838 2 =
299492994242299992492444422992424244422244
2 5 6A030486A030484Source81401637345465395512991484 2 =
6626226562522666562566262626266252566552622656522256
2 5 7A030487A030485SourceOne infinite pattern
1(6n)5 2 = 2(7n)(2n+1)5  [n>=0]
870185357137045415 2 =
757222555775727275772757755772522225
2 5 8A053926A053927Source159013392166264585 2 =
25285258888222255288288552225222225
2 5 9A053928A053929Source1598601020441309256565 2 =
2555525222555995255555255252529952995599225
2 6 7A058461A058462Source150573163864701424 2 =
22672277676226226672276776667627776
2 6 8---combination impossible
2 6 9A053930A053931Source 1
Source 2
Source 3
47567102808870567435673 2 =
2262629269629662226292666922999622262992962929
2 7 8---combination impossible
2 7 9A053932A053933Source14907304327 2 =
222227722297792922929
2 8 9A053934A053935Source5405829167667 2 =
29222988989999289998222889
3 4 5A053936A053937Source21343231796858797962 2 =
455533543534444433554534333443535353444
3 4 6A053938A053939Source6666680833328031344 2 =
44444633333463334436443663666646446336
3 4 7A058463A058464Source1864878916830083039312 2 =
3477773374437343773773333743737447337433344
3 4 8A053940A053941Source5906300402396058566810062 2 =
34884384443343843348888488484833488344838384443844
3 4 9A053942A053943Source185605616817891584607 2 =
34449444994349999433343349994949439344449
3 5 6A053944A053945Source23527926717739784 2 =
553563335635333565566365536366656
3 5 7---impossible since all 3 digits odd
3 5 8---combination impossible
3 5 9---impossible since all 3 digits odd
3 6 7A053946A053947Source1932967502917049474 2 =
3736363367333373666777367633763676676
3 6 8A058465A058466Source183539278812156 2 =
33686666866886336386333368336
3 6 9A053948A053949Source18430047920827535573187 2 =
339666666363999366939366969366969936633336969
3 7 8---combination impossible
3 7 9---impossible since all 3 digits odd
3 8 9A058467A058468Source199974958167 2 =
39989983893893399999889
4 5 6A030177A030176Source675754811056988742949784 2 =
456644564666666555445565455644644555565545646656
4 5 7A053950A053951Source8629863583949388 2 =
74474545477575775744575745574544
4 5 8A053952A053953Source767175898056538 2 =
588558858558855585845444545444
4 5 9A053954A053955Source703957001491895099962643 2 =
495555459949459999994555545994544549499995545449
4 6 7A053956A053957Source815277035409723028858892 2 =
664676644466466777446466766667744446667647467664
4 6 8A053958A053959Source26204321529981784378 2 =
686666466846666884868486448488884846884
4 6 9A053960A053961Source9718263579193026119075264 2 =
94444646994669646646646969664664969996646496669696
4 7 8A053962A053963Source22019193553462506122 2 =
484844884744844787448744774844887478884
4 7 9A053964A053965Source8819171038 2 =
77777777797497997444
4 8 9A053966A053967SourceOne infinite pattern
(6n)7 2 = (4n+1)(8n)9  [n>=0]
6670081667 2 =
44489989444449498889
5 6 7A053968A053969Source2562353735836753390526 2 =
6565656667556566576676575665776756666556676
5 6 8  SourceOnly this one rather trivial solution is known
816 2 =
665856
5 6 9A053970A053971Source834023722663550236 2 =
695595569965566559565695699695655696
5 7 8---combination impossible
5 7 9---impossible since all 3 digits odd
5 8 9A058469A058470Source92496431583 2 =
8555589855588599885889
6 7 8  Source( No rootsolutions under 10 25
info from Hisanori Mishima's website )
6 7 9A053972A053973Source9831977256725526 2 =
96667776776767999797799699976676
6 8 9A053974A053975Source2588184048685235767383 2 =
6698696669868698868988986669668968886668689
7 8 9A058471A058472Source9949370777987917 2 =
98989978877879888789778997998889
```

```

Farideh Firoozbakht (email)
A058426 (squares with digits 0,2 & 5)
[ di 9/12/2008 20:37 ]

I found the following interesting infinite pattern for numbers m such that
the digits of m2 are 0, 2 & 5 which isn't in the mentioned in the table

a(n) = 4.4.(92^1–1).4.(92^2–1).4.(92^3–1). ... .4.(92^n–1).5      [ n > 0 ]

b(n) = a(n)2 = {20} . {20.5.(02^1–1)} . {20.5.(02^1–1).5.(02^2–1)} . ... . {20.5.(02^1–1).5.(02^2–1) . ... . 5.(02^n–1)} . {25}

Examples :

a(1) = 4.4.9.5 = 4495
b(1) = {20}.{2050}.{25} = 20205025

a(2) = 4.4.9.4.999.5 = 44949995
b(2) = {20}.{2050}.{20505000}.{25} =2020502050500025

a(3) = 4.4.9.4.999.4.9999999.5 = 4494999499999995
b(3) = {20}.{2050}.{20505000}.{2050500050000000}.{25} = 20205020505000205050005000000025

a(4) = 4.4.9.4.999.4.9999999.4.999999999999999.5 = 44949994999999949999999999999995
b(4) = {20}.{2050}.{20505000}.{2050500050000000}. {20505000500000005000000000000000}.{25}
= 2020502050500020505000500000002050500050000000500000000000000025

I hope that the pattern and examples are clear.

Best wishes,
Farideh

Farideh Firoozbakht (email)
A058426 (squares with digits 0,2 & 5)
[ di 16/12/2008 17:22 ]

I also found the following similar patterns a(n, k) for [ 1 < k < n+1 ].

a(n, k) = 4.4.(92^1–1).4.(92^2–1).4.(92^3–1). ... .4.(92^n–1).4.(92^k–2).5      [1 < k < n+1]

The formula for b(n, k) = a(n, k)2 is more intricate than of b(n).

I wrote the formula of b(n, 2) after the following examples :

a(2, 2) = 4.4.9.4.999.4.99.5 = 44949994995
b(2, 2) = 2020502050050525050025

a(3, 2) = 4.4.9.4.999.4.9999999.4.99.5 = 4494999499999994995
b(3, 2) = 20205020505000205005055005000025050025

a(3, 3) = 4.4.9.4.999.4.9999999.4.999999.5 = 44949994999999949999995
b(3, 3) = 2020502050500020505000050500052500000500000025

a(4, 2) = 4.4.9.4.999.4.9999999.4.9999999999999994.99.5
= 44949994999999949999999999999994995
b(4, 2) = 2020502050500020505000500000002050050550050000500500000000000025050025

a(4, 3) = 4.4.9.4.999.4.9999999.4.9999999999999994.999999.5
= 449499949999999499999999999999949999995
b(4, 3) = 202050205050002050500050000000205050000505000550000005000000002500000500000025

a(4, 4) = 4.4.9.4.999.4.9999999.4.9999999999999994.99999999999999.5
= 44949994999999949999999999999994999999999999995
b(4, 4) = 2020502050500020505000500000002050500050000000050500050000000525000000000000050000000000000025

b(n, 2) for [ n > 2 ], includes 2n substrings and I separated them with "." and put them
between parentheses as follows.

b(n, 2) =

{20205}.
{(02^1–1).205}.
{(02^1–1).5.(02^2–1).205}.
{(02^1–1).5.(02^2
1).5.(02^3–1).205}.
... .
{(02^1–1).5.(02^2–1).5.(02^3–1). ... .5.(02^(n–1)–1).205}.
{00505}.
{5005.(02^3–4)}.
{5005.(02^4–4)}.
...
{5005.(02^n–4)}.
{25050025}

Examples :

b(3, 2) = a(3, 2)2 =

{20205}.
{(02^1–1).205}.
{(02^1–1).5.(02^2–1).205}.
{00505}.
{5005.(02^3–4)}.
{25050025}

=
20205.
0205.
0.5.000.205.
00505.
5005.0000.
25050025.

= 20205020505000205005055005000025050025

b(4, 2) = a(4, 2)2 =

{20205}.
{(02^1–1).205}.
{(02^1–1).5.(02^2–1).205}.
{(02^1–1).5.(02^2–1).5.(02^3–1).205}.
{00505}.
{5005.(02^3–4)}.
{5005.(02^4–4)}.
{25050025}

=
20205.
0205.
0.5.000.205.
0.5.000.5.0000000.205.
00505.
5005.0000.
5005.000000000000.
25050025

= 2020502050500020505000500000002050050550050000500500000000000025050025

Hope that the formula for b(n,2) and the examples are clear.

Best wishes,
Farideh

Farideh Firoozbakht (email)
A058426 (squares with digits 0,2 & 5)
[ vr 19/12/2008 16:22 ]

I also found a very nice formula for b(n, k) :

b(n, k), [ 1 < k < n ] :

b(n, k) =

{20}.

{20.5.(02^1–1)}.
{20.5.(02^1–1).5.(02^2–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1).5.(02^5–1)}.
...
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1). ... .5.(02^(n–1)–1)}.

{20.5.(02^1–1).5.(02^2–1).5.(02^3–1). ... .5.(02^(k–2)–1).5.(02^(k–1)).
5.(02^1–1).5.(02^2–1).5.(02^3–1). ... .5.(02^(k–2)–1).5.(02^(k–1)–1).5}.

{5.(02^k–2).5.(02^(k+1)–2^k)}.
{5.(02^k–2).5.(02^(k+2)–2^k)}.
...
{5.(02^k–2).5.(02^n–2^k)}.

{25.(02^k–3).5.(02^k–2).25}

and

b(n, n), [ n > 2 ] :

b(n, n) =

{20}.

{20.5.(02^1–1)}.
{20.5.(02^1–1).5.(02^2–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1)}.
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1).5.(02^5–1)}.
...
{20.5.(02^1–1).5.(02^2–1).5.(02^3–1).5.(02^4–1). ... .5.(02^(n–1)–1)}.

{20.5.(02^1–1).5.(02^2–1).5.(02^3–1). ... .5.(02^(n–2)–1).5.(02^(n–1)).
5.(02^1–1).5.(02^2–1).5.(02^3–1). ... .5.(02^(n–2)–1).5.(02^(n–1)–1).5}.

{25.(02^n–3).5.(02^n–2).25}

Dear Farideh,

What an intricate and beautiful patterns you discovered there! Thanks a lot !

Farideh Firoozbakht (email)
A058426 (squares with digits 0,2 & 5)
[ di 24/02/2009 9:24 ]

Since the following six numbers are solutions of infinite patterns so they
must not be in the table of sporadic solutions.

1. 4495
2. 4949995
3. 4949994995
4. 4494999499499995
5. 4494999499999995
6. 4494999499999994995

The number 44949994999999949999995 isn't a solution of my infinite pattern.

Patrick replied :
But are you sure that the last number couldn't be made part of that
infinite pattern as well. It does look so similar to the others, perhaps
an adaptation 'somehow' of your pattern could include this one as well ?

Farideh Firoozbakht (email)
A058426 (squares with digits 0,2 & 5) - New patterns
[ di 26/02/2009 4:29 ]

1.
For each natural number n, [ n > 1 ] there exist n numbers m of the following
form where m2 has only three distinct digits 0, 2 & 5.

44.(92^1–1).4(92^2–1).4. ... (92^n–1).4.99.4.(9k).5

Where k is in the set A(n) = {2^3–2, 2^4–2, ..., 2^n–2, 2^(n+1)–4, 2^(n+1)+2}.

Note that A(n) has n elements and A(2) has only the two last terms.

Since for [ n > 2 ] we have min(A(n)) = 6 and only for [ n = 2 ] min(A(n)) = 4,
I considered the two solutions related to A(2) = {4,10} namely 4494999499499995 &

But as you expected we can include these two solutions, specially the first one
which is correspondent to 4 ( the smallest term of A(2) ), in these infinite patterns.

Suppose that the i-th term (in increasing order) of A(n) = A(n,i) now we define :

c(n,i) = 44.(92^1–1).4(92^2–1).4. ... (92^n–1).4.99.4.(9A(n,i)).5
and
cc(n,i) = c(n,i)2.

Examples :

c(2,1) = 44.(92^1–1).4.(92^2–1).4.99.4.(9A(2,1)).5

c(2,2) = 44.(92^1–1).4.(92^2–1).4.99.4.(9A(2,2)).5

c(3,2) = 44.(92^1–1).4.(92^2–1).4.(92^3–1).4.99.4.(9A(3,2)).5

A(2,1) = 2^(2+2)–4 = 4 ; A(2,2) = 2^(2+2)+2 = 10 ; A(3,2) = 2^(3+1)–4 = 12

Hence,

c(2,1) = 4494999499499995
c(2,2) = 4494999499499999999995
c(3,2) = 44949994999999949949999999999995

cc(2,1) = 20205020500505205550255005000025
cc(2,2) = 20205020500505250500205050005005000000000025
cc(3,2) = 2020502050500020500505500500002055502550000000500500000000000025

2.
For each natural number n, there exists a number d(n),

d(n) = 5.(03*2^(n–1)–1).5.(03*2^(n–2)–1). ... . 5.(03*2^0–1).49995505,

where dd(n) = d(n)2 has only three distinct digits 0, 2 & 5.

Note that we have d(n+1) = 5.(03*2^n–1).d(n) and number of digits of d(n) equals to
8 + (3*2^0 + 3*2^1 + ... + 3*2^(n-1)) = 3*2^n + 5.

So for the sequence {d(n)} we obtain the following recursion relation.

d(1) = 50049995505, d(n+1) = d(n) + 5*10^(3*2^(n+1)+4).

Examples :

d(2) = 5.(03*2^1–1).5.(03*2^0–1).49995505 = 50000050049995505
dd(2) = 2500005005002055502050050520205025

d(3) = 5.(03*2^2–1).5.(03*2^1–1).5.(03*2^0–1).49995505
d(3) = 50000000000050000050049995505
dd(3) = 2500000000005000005005002050505005002055502050050520205025

d(4) = d(3) + 5*10^(3*2^4+4) = 50000000000050000050049995505 + 5*10^52
d(4) = 50000000000000000000000050000000000050000050049995505.

```

```