COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### generation of Apocalyptic number

• Follow

```Hi Group,

I woud like to know how can i store a number generated out of 2 to
power of 150
i.e pow(2,150);

mainly i want to knw how can i get the value a large powers of a
number....!

since this crosses all the data type limits ........

can any one tell me the solution ? or c code to do this which will
print it.

cheers
R
```
 0
Reply rajshekhar3 (15) 9/23/2008 9:06:53 AM

```Rajshekhar wrote:

> Hi Group,
>
> I woud like to know how can i store a number generated out of 2
> to power of 150
> i.e pow(2,150);
>
> mainly i want to knw how can i get the value a large powers of
> a number....!
>
> since this crosses all the data type limits ........
>
> can any one tell me the solution ? or c code to do this which
> will print it.

Use a big number library.

You can print it very easily by the way, if binary is ok for you:

char _149zeros[150];
int i;
for(i = 0; i < 149; ++i) {
_149zeros[i] = '0';
}
_149zeros[149] = '\0';
printf("b%c%s", '1', _149zeros);

;-)

No really, what you're looking for is a library to deal with
arbitrary large numbers. Google for it, there are plenty of
them.

Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867

```
 0
Reply wdraxinger (404) 9/23/2008 9:47:53 AM

```On Sep 23, 2:47=A0pm, Wolfgang Draxinger <wdraxin...@darkstargames.de>
wrote:
> Rajshekhar wrote:
> > Hi Group,
>
> > I woud like to know how can i store a number generated out of 2
> > to power of 150
> > i.e pow(2,150);
>
> > mainly i want to knw how can i get the value a large powers of
> > a number....!
>
> > since this crosses all the data type limits ........
>
> > can any one tell me the solution ? or c code to do this which
> > will print it.
>
> Use a big number library.
>
> You can print it very easily by the way, if binary is ok for you:
>
> char _149zeros[150];
> int i;
> for(i =3D 0; i < 149; ++i) {
> =A0 =A0 =A0 =A0 _149zeros[i] =3D '0';}
>
> _149zeros[149] =3D '\0';
> printf("b%c%s", '1', _149zeros);
>
> ;-)
>
> No really, what you're looking for is a library to deal with
> arbitrary large numbers. Google for it, there are plenty of
> them.
>
> Wolfgang Draxinger
> --
> E-Mail address works, Jabber: hexar...@jabber.org, ICQ: 134682867

Hi,

Thanks for the reply

"A number of the form 2^n that contains the digits 666 (i.e., the
beast number) is called an apocalyptic number.  is an apocalyptic
number.
The first few such powers are 157, 192, 218, 220, ..."

so to check whether the number has 666 or not first i have to have the
number stored ??

thats exactly what i want
hope u got what i am trying to say..!

cheers
```
 0
Reply rajshekhar3 (15) 9/23/2008 10:17:22 AM

```Rajshekhar wrote:
> Hi Group,
>
> I woud like to know how can i store a number generated out of 2 to
> power of 150
> i.e pow(2,150);
>
> mainly i want to knw how can i get the value a large powers of a
> number....!
>
> since this crosses all the data type limits ........
>
> can any one tell me the solution ? or c code to do this which will
> print it.
>
> cheers
> R

If you use the lcc-win compiler you do:
#include <qfloat.h>
#include <stdio.h>
int main(void)
{
qfloat s = pow(2.0q,150.0q);

printf("%50.2qf\n",s);
return 0;
}

Output:

1427247692705959881058285969449495136382746624.00

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
```
 0
Reply jacob4111 (1334) 9/23/2008 10:41:28 AM

```Rajshekhar <rajshekhar3@gmail.com> writes:

> On Sep 23, 2:47 pm, Wolfgang Draxinger <wdraxin...@darkstargames.de>
> wrote:
>> Rajshekhar wrote:
<snip>
>> > I woud like to know how can i store a number generated out of 2
>> > to power of 150
>> > i.e pow(2,150);
<snip>
>> Use a big number library.
<snip>
>> Wolfgang Draxinger
>> --

Best not to quote sig blocks.  Cut them by hand if you need to.

<snip>
> "A number of the form 2^n that contains the digits 666 (i.e., the
> beast number) is called an apocalyptic number.  is an apocalyptic
> number.
> The first few such powers are 157, 192, 218, 220, ..."

You mean that contain "666" in decimal or in any base >= 7?

> so to check whether the number has 666 or not first i have to have the
> number stored ??

Well, in some sense yes.  But what do you mean by store the number?  I
suspect you mean "I need to store it as a decimal string so I look for
666".  If that is what you mean, then no, you can store the number in
other forms and still check for it being apocalyptic.

Posting in comp.programming may be better sine the algorithm is not a C
question.  There may even be a more suitable group -- I don't know.

--
Ben.
```
 0
Reply ben.usenet (6515) 9/23/2008 2:43:57 PM

```Rajshekhar <rajshekhar3@gmail.com> writes:
> I woud like to know how can i store a number generated out of 2 to
> power of 150
> i.e pow(2,150);
>
> mainly i want to knw how can i get the value a large powers of a
> number....!
>
> since this crosses all the data type limits ........
>
> can any one tell me the solution ? or c code to do this which will
> print it.

If you're only interested in exact powers of 2, you may not need any
kind of extended precision; ordinary floating-point could do the job.

You said in a followup that the exponents you were interested in were
157, 192, 218, and 220.  Here's a program that shows 2**n for each of
those values.

#include <stdio.h>
#include <math.h>

int main(void)
{
int expon[] = { 157, 192, 218, 220 };
int i;
for (i = 0; i < sizeof expon / sizeof *expon; i ++) {
printf("%f\n", pow(2.0, expon[i]));
}
return 0;
}

Typically any power of 2 within the range of a floating-point type can
be represented exactly.  I don't think printf is actually required to
print such numbers accurately; it does in my implementation.  Each
line of output for the above program, when I run it on my system,
includes the sequence "666".

If you need larger exponents, using long double rather than double can
probably get you some extra range (though that's not guaranteed).

Note that if you wanted anything other than powers of 2, or if your
implementation doesn't work the way mine does, the above solution
won't be particularly useful.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
```
 0
Reply kst-u (21480) 9/23/2008 4:34:26 PM

```Rajshekhar wrote:

> "A number of the form 2^n that contains the digits 666 (i.e.,
> the beast number) is called an apocalyptic number.  is an
> apocalyptic number.

Sorry, I'm not a guy interested in numerology. Number theory yes,
but that should be probably everybody dealing with computer
science.

The only special numbers to me are 0, 1, pi and e. That combined
with Peano's axioms and Euler's formula e^(i * pi) + 1 = 0.
Everything else is just a matter of definition.

So if anybody says to me, a number is apocalyptic, I assume that
to be a metaphor for: My program can't deal with that, due to
lack of resolution.

Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867

```
 0
Reply wdraxinger (404) 9/23/2008 5:12:35 PM

```Wolfgang Draxinger <wdraxinger@darkstargames.de> writes:
> Rajshekhar wrote:
>
>> "A number of the form 2^n that contains the digits 666 (i.e.,
>> the beast number) is called an apocalyptic number.  is an
>> apocalyptic number.
>
> Sorry, I'm not a guy interested in numerology. Number theory yes,
> but that should be probably everybody dealing with computer
> science.
>
> The only special numbers to me are 0, 1, pi and e. That combined
> with Peano's axioms and Euler's formula e^(i * pi) + 1 = 0.
> Everything else is just a matter of definition.

And Rajshekhar provided a definition, so what's the problem?

> So if anybody says to me, a number is apocalyptic, I assume that
> to be a metaphor for: My program can't deal with that, due to
> lack of resolution.

Your answer is relevant neither to the OP's question nor to C.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
```
 0
Reply kst-u (21480) 9/23/2008 6:01:13 PM

```On Tue, 23 Sep 2008 03:17:22 -0700 (PDT), Rajshekhar
<rajshekhar3@gmail.com> wrote:

> "A number of the form 2^n that contains the digits 666 (i.e., the
> beast number) is called an apocalyptic number.  is an apocalyptic
> number.
> The first few such powers are 157, 192, 218, 220, ..."
>
> so to check whether the number has 666 or not first i have to have the
> number stored ??
>
> thats exactly what i want
> hope u got what i am trying to say..!

This calls for wisdom. The definition of an apocalyptic number might
need to be updated since the discovery that the number of the beast
was 616 not 666 in the Oxyrhynchus Papyrus p115, the earliest evidence
for the text of Rev. 13:18 (3rd century). If we are looking for the
first few powers of 2 that contain the substring "616" in their
decimal representation, the values are:

2**64   = 18446744073709551616
2**134 = 21778071482940061661655974875633165533184
2**155 = 45671926166590716193865151022383844364247891968
2**164 = 23384026197294446691258957323460528314494920687616
2**188 = 392318858461667547739736838950479151006397215279002157056

I calculated those with a few lines of ruby, but I figure that is ok
because wisdom is more precious than rubies (Prov. 8:11).

Tony
```
 0
Reply afmcc (39) 9/23/2008 7:15:08 PM

```Rajshekhar wrote:
>
> I woud like to know how can i store a number generated out of 2
> to power of 150 i.e pow(2,150);
>
> mainly i want to knw how can i get the value a large powers of a
> number!  since this crosses all the data type limits.
>
> can any one tell me the solution ? or c code to do this which will
> print it.

Try simply using strings.  The result will be roughly a 60 char.
string for positive powers.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
```
 0
Reply cbfalconer (19183) 9/23/2008 11:07:26 PM

```Keith Thompson wrote:

> And Rajshekhar provided a definition, so what's the problem?

He's doing numerology :-(

BTW: I forgot to include 'i' into my set of essential numbers.

>> So if anybody says to me, a number is apocalyptic, I assume
>> that to be a metaphor for: My program can't deal with that,
>> due to lack of resolution.
>
> Your answer is relevant neither to the OP's question nor to C.

Well, the OP's question touches C only insofar, that he is
actually searching for a certain sequence of digits within the
(decimal?) representation of a number. If e.g. he'd look at a
base 5 representation, there would be no occourence of 666 at
all.

The whole topic is IMHO a waste of time. And if the OP really is
just looking for such numbers, well, then he might be better of
with Python, which has big number support built in.

Now I'm getting completely off topic (sorry), this is a Python
3-liner, doing exactly what the OP seems to want:

for i in range(500):
if str(2**i).find('666')>=0:
print "2^%d is 'apocalyptic': %s" % (i, str(2**i))

running it results in

2^157 is 'apocalyptic':
182687704666362864775460604089535377456991567872
2^192 is 'apocalyptic':
6277101735386680763835789423207666416102355444464034512896
2^218 is 'apocalyptic':
421249166674228746791672110734681729275580381602196445017243910144
2^220 is 'apocalyptic':
1684996666696914987166688442938726917102321526408785780068975640576
2^222 is 'apocalyptic':
6739986666787659948666753771754907668409286105635143120275902562304
2^224 is 'apocalyptic':
26959946667150639794667015087019630673637144422540572481103610249216
2^226 is 'apocalyptic':
107839786668602559178668060348078522694548577690162289924414440996864
2^243 is 'apocalyptic':
14134776518227074636666380005943348126619871175004951664972849610340958208
2^245 is 'apocalyptic':
56539106072908298546665520023773392506479484700019806659891398441363832832
2^247 is 'apocalyptic':
226156424291633194186662080095093570025917938800079226639565593765455331328
2^251 is 'apocalyptic':
3618502788666131106986593281521497120414687020801267626233049500247285301248
2^278 is 'apocalyptic':
485667223056432267729865476705879726660601709763034880312953102434726071301302124544
2^285 is 'apocalyptic':
62165404551223330269422781018352605012557018849668464680057997111644937126566671941632
2^286 is 'apocalyptic':
124330809102446660538845562036705210025114037699336929360115994223289874253133343883264
2^287 is 'apocalyptic':
248661618204893321077691124073410420050228075398673858720231988446579748506266687766528
2^312 is 'apocalyptic':
8343699359066055009355553539724812947666814540455674882605631280555545803830627148527195652096
2^355 is 'apocalyptic':
73391955711682288371546268649666782105490079653384995959602842860381532034831513858240593699524021969747968
2^361 is 'apocalyptic':
4697085165547666455778961193578674054751365097816639741414581943064418050229216886927397996769537406063869952
2^366 is 'apocalyptic':
150306725297525326584926758194517569752043683130132471725266622178061377607334940381676735896625196994043838464
2^382 is 'apocalyptic':
9850501549098619803069760025035903451269934817616361666987073351061430442874302652853566563721228910201656997576704
2^384 is 'apocalyptic':
39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306816
2^390 is 'apocalyptic':
2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224
2^394 is 'apocalyptic':
40347654345107946713373737062547060536401653012956617387979052445947619094013143666088208645002153616185987062074179584
2^411 is 'apocalyptic':
5288447750321988791615322464262168318627237463714249754277190362195246329890490766601513683517722278780729696200186866434048
2^434 is 'apocalyptic':
44362715105933037753254626946289339254982993206013065202727673289833940924890009968639590497666233249558259375382457149263586525184
2^443 is 'apocalyptic':
22713710134237715329666368996500141698551292521478689383796568724394977753543685103943470334805111423773828800195818060422956300894208
2^478 is 'apocalyptic':
780437137578998057845399307448291576437149535666242787714789239906342934704941405030076525765872992789956732780351655723861993919822071326572544
2^497 is 'apocalyptic':
409173825987017733751648712103449894027080255755383098685411421012016724550584319360408761540738019643860835515945008876152157068235674131666065948672
2^499 is 'apocalyptic':
1636695303948070935006594848413799576108321023021532394741645684048066898202337277441635046162952078575443342063780035504608628272942696526664263794688

But as I said already, this is a total scam, since a simple
change of base will change the representation, though the
numbers remain the very same.

Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867

```
 0
Reply wdraxinger (404) 9/23/2008 11:51:01 PM

```On Sep 24, 4:51=A0am, Wolfgang Draxinger <wdraxin...@darkstargames.de>
wrote:
> Keith Thompson wrote:
> > And Rajshekhar provided a definition, so what's the problem?
>
> He's doing numerology :-(
>
> BTW: I forgot to include 'i' into my set of essential numbers.
>
> >> So if anybody says to me, a number is apocalyptic, I assume
> >> that to be a metaphor for: My program can't deal with that,
> >> due to lack of resolution.
>
> > Your answer is relevant neither to the OP's question nor to C.
>
> Well, the OP's question touches C only insofar, that he is
> actually searching for a certain sequence of digits within the
> (decimal?) representation of a number. If e.g. he'd look at a
> base 5 representation, there would be no occourence of 666 at
> all.
>
> The whole topic is IMHO a waste of time. And if the OP really is
> just looking for such numbers, well, then he might be better of
> with Python, which has big number support built in.
>
> Now I'm getting completely off topic (sorry), this is a Python
> 3-liner, doing exactly what the OP seems to want:
>
> for i in range(500):
> =A0 =A0 if str(2**i).find('666')>=3D0:
> =A0 =A0 =A0 =A0 print "2^%d is 'apocalyptic': %s" % (i, str(2**i))
>
> running it results in
>
> 2^157 is 'apocalyptic':
> 182687704666362864775460604089535377456991567872
> 2^192 is 'apocalyptic':
> 6277101735386680763835789423207666416102355444464034512896
> 2^218 is 'apocalyptic':
> 421249166674228746791672110734681729275580381602196445017243910144
> 2^220 is 'apocalyptic':
> 1684996666696914987166688442938726917102321526408785780068975640576
> 2^222 is 'apocalyptic':
> 6739986666787659948666753771754907668409286105635143120275902562304
> 2^224 is 'apocalyptic':
> 26959946667150639794667015087019630673637144422540572481103610249216
> 2^226 is 'apocalyptic':
> 107839786668602559178668060348078522694548577690162289924414440996864
> 2^243 is 'apocalyptic':
> 1413477651822707463666638000594334812661987117500495166497284961034095820=
8
> 2^245 is 'apocalyptic':
> 5653910607290829854666552002377339250647948470001980665989139844136383283=
2
> 2^247 is 'apocalyptic':
> 2261564242916331941866620800950935700259179388000792266395655937654553313=
28
> 2^251 is 'apocalyptic':
> 3618502788666131106986593281521497120414687020801267626233049500247285301=
> 2^278 is 'apocalyptic':
> 4856672230564322677298654767058797266606017097630348803129531024347260713=
> 2^285 is 'apocalyptic':
> 6216540455122333026942278101835260501255701884966846468005799711164493712=
> 2^286 is 'apocalyptic':
> 1243308091024466605388455620367052100251140376993369293601159942232898742=
> 2^287 is 'apocalyptic':
> 2486616182048933210776911240734104200502280753986738587202319884465797485=
> 2^312 is 'apocalyptic':
> 8343699359066055009355553539724812947666814540455674882605631280555545803=
> 2^355 is 'apocalyptic':
> 7339195571168228837154626864966678210549007965338499595960284286038153203=
> 2^361 is 'apocalyptic':
> 4697085165547666455778961193578674054751365097816639741414581943064418050=
> 2^366 is 'apocalyptic':
> 1503067252975253265849267581945175697520436831301324717252666221780613776=
> 2^382 is 'apocalyptic':
> 9850501549098619803069760025035903451269934817616361666987073351061430442=
> 2^384 is 'apocalyptic':
> 3940200619639447921227904010014361380507973927046544666794829340424572177=
> 2^390 is 'apocalyptic':
> 2521728396569246669585858566409191283525103313309788586748690777871726193=
> 2^394 is 'apocalyptic':
> 4034765434510794671337373706254706053640165301295661738797905244594761909=
> 2^411 is 'apocalyptic':
> 5288447750321988791615322464262168318627237463714249754277190362195246329=
> 2^434 is 'apocalyptic':
> 4436271510593303775325462694628933925498299320601306520272767328983394092=
> 2^443 is 'apocalyptic':
> 2271371013423771532966636899650014169855129252147868938379656872439497775=
> 2^478 is 'apocalyptic':
> 7804371375789980578453993074482915764371495356662427877147892399063429347=
> 2^497 is 'apocalyptic':
> 4091738259870177337516487121034498940270802557553830986854114210120167245=
48672
> 2^499 is 'apocalyptic':
> 1636695303948070935006594848413799576108321023021532394741645684048066898=
>
> But as I said already, this is a total scam, since a simple
> change of base will change the representation, though the
> numbers remain the very same.
>
> Wolfgang Draxinger
> --
> E-Mail address works, Jabber: hexar...@jabber.org, ICQ: 134682867

Thanks for all the replies..

Let me re-frame my question,

Write a program which tests the Apocalyptic number.
An Apocalyptic number is:
"A number of the form 2^n that contains the digits 666 (i.e., the
beast number) is called an apocalyptic number.The first few such
powers are 157, 192, 218, 220, ..."
The list goes on....

Program should only take power(n) as input (which is 2^n ) for any
given values as said above
and the output should whether this power will form apocalyptic number
or not.

So here my data type should be capable enough to hold for any (dynamic
in nature)powered number which may run into 50's
or 100' digits of generated out of 2^n.

FOr example like
2^499 is 'apocalyptic':
163669530394807093500659484841379957610832102302153239474164568404806689820=
233727744163504616295207857544334206378003550460862827294269652666426379468=
8

P.S: you need to print that value from ur data structure used for
storing it not the direct output of
pow(2,n) !!!

For any clarifications write back :)

```
 0
Reply rajshekhar3 (15) 9/24/2008 3:48:21 AM

```On Sep 24, 8:48=A0am, Rajshekhar <rajshekh...@gmail.com> wrote:
> On Sep 24, 4:51=A0am, Wolfgang Draxinger <wdraxin...@darkstargames.de>
> wrote:
>
>
>
>
>
> > Keith Thompson wrote:
> > > And Rajshekhar provided a definition, so what's the problem?
>
> > He's doing numerology :-(
>
> > BTW: I forgot to include 'i' into my set of essential numbers.
>
> > >> So if anybody says to me, anumberisapocalyptic, I assume
> > >> that to be a metaphor for: My program can't deal with that,
> > >> due to lack of resolution.
>
> > > Your answer is relevant neither to the OP's question nor to C.
>
> > Well, the OP's question touches C only insofar, that he is
> > actually searching for a certain sequence of digits within the
> > (decimal?) representation of anumber. If e.g. he'd look at a
> > base 5 representation, there would be no occourence of 666 at
> > all.
>
> > The whole topic is IMHO a waste of time. And if the OP really is
> > just looking for such numbers, well, then he might be better of
> > with Python, which has bignumbersupport built in.
>
> > Now I'm getting completely off topic (sorry), this is a Python
> > 3-liner, doing exactly what the OP seems to want:
>
> > for i in range(500):
> > =A0 =A0 if str(2**i).find('666')>=3D0:
> > =A0 =A0 =A0 =A0 print "2^%d is 'apocalyptic': %s" % (i, str(2**i))
>
> > running it results in
>
> > 2^157 is 'apocalyptic':
> > 182687704666362864775460604089535377456991567872
> > 2^192 is 'apocalyptic':
> > 6277101735386680763835789423207666416102355444464034512896
> > 2^218 is 'apocalyptic':
> > 421249166674228746791672110734681729275580381602196445017243910144
> > 2^220 is 'apocalyptic':
> > 1684996666696914987166688442938726917102321526408785780068975640576
> > 2^222 is 'apocalyptic':
> > 6739986666787659948666753771754907668409286105635143120275902562304
> > 2^224 is 'apocalyptic':
> > 26959946667150639794667015087019630673637144422540572481103610249216
> > 2^226 is 'apocalyptic':
> > 107839786668602559178668060348078522694548577690162289924414440996864
> > 2^243 is 'apocalyptic':
> > 14134776518227074636666380005943348126619871175004951664972849610340958=
208
> > 2^245 is 'apocalyptic':
> > 56539106072908298546665520023773392506479484700019806659891398441363832=
832
> > 2^247 is 'apocalyptic':
> > 22615642429163319418666208009509357002591793880007922663956559376545533=
1328
> > 2^251 is 'apocalyptic':
> > 36185027886661311069865932815214971204146870208012676262330495002472853=
> > 2^278 is 'apocalyptic':
> > 48566722305643226772986547670587972666060170976303488031295310243472607=
> > 2^285 is 'apocalyptic':
> > 62165404551223330269422781018352605012557018849668464680057997111644937=
> > 2^286 is 'apocalyptic':
> > 12433080910244666053884556203670521002511403769933692936011599422328987=
> > 2^287 is 'apocalyptic':
> > 24866161820489332107769112407341042005022807539867385872023198844657974=
> > 2^312 is 'apocalyptic':
> > 83436993590660550093555535397248129476668145404556748826056312805555458=
> > 2^355 is 'apocalyptic':
> > 73391955711682288371546268649666782105490079653384995959602842860381532=
> > 2^361 is 'apocalyptic':
> > 46970851655476664557789611935786740547513650978166397414145819430644180=
> > 2^366 is 'apocalyptic':
> > 15030672529752532658492675819451756975204368313013247172526662217806137=
> > 2^382 is 'apocalyptic':
> > 98505015490986198030697600250359034512699348176163616669870733510614304=
> > 2^384 is 'apocalyptic':
> > 39402006196394479212279040100143613805079739270465446667948293404245721=
> > 2^390 is 'apocalyptic':
> > 25217283965692466695858585664091912835251033133097885867486907778717261=
> > 2^394 is 'apocalyptic':
> > 40347654345107946713373737062547060536401653012956617387979052445947619=
> > 2^411 is 'apocalyptic':
> > 52884477503219887916153224642621683186272374637142497542771903621952463=
> > 2^434 is 'apocalyptic':
> > 44362715105933037753254626946289339254982993206013065202727673289833940=
> > 2^443 is 'apocalyptic':
> > 22713710134237715329666368996500141698551292521478689383796568724394977=
> > 2^478 is 'apocalyptic':
> > 78043713757899805784539930744829157643714953566624278771478923990634293=
2544
> > 2^497 is 'apocalyptic':
> > 40917382598701773375164871210344989402708025575538309868541142101201672=
> > 2^499 is 'apocalyptic':
> > 16366953039480709350065948484137995761083210230215323947416456840480668=
>
> > But as I said already, this is a total scam, since a simple
> > change of base will change the representation, though the
> > numbers remain the very same.
>
> > Wolfgang Draxinger
> > --
> > E-Mail address works, Jabber: hexar...@jabber.org, ICQ: 134682867
>
> Thanks for all the replies..
>
> Let me re-frame my question,
>
> Write a program which tests theApocalypticnumber.
> AnApocalypticnumberis:
> =A0 =A0 "Anumberof the form 2^n that contains the digits 666 (i.e., the
> beastnumber) is called anapocalypticnumber.The first few such
> powers are 157, 192, 218, 220, ..."
> The list goes on....
>
> Program should only take power(n) as input (which is 2^n ) for any
> given values as said above
> and the output should whether this power will formapocalypticnumber
> or not.
>
> So here my data type should be capable enough to hold for any (dynamic
> in nature)powerednumberwhich may run into 50's
> or 100' digits of generated out of 2^n.
>
> FOr example like
> 2^499 is 'apocalyptic':
> 1636695303948070935006594848413799576108321023021532394741645684048066898=
> 2337277441635046162952078575443342063780035504608628272942696526664263794=
> 8
>
> P.S: you need to print that value from ur data structure used for
> storing it not the direct output of
> pow(2,n) !!!
>
> For any clarifications write back :)- Hide quoted text -
>
> - Show quoted text -

any solutions ??
```
 0
Reply rajshekhar3 (15) 9/26/2008 3:50:54 AM

```Rajshekhar <rajshekhar3@gmail.com> writes:

> On Sep 24, 8:48 am, Rajshekhar <rajshekh...@gmail.com> wrote:
<snip>
>> Let me re-frame my question,
>>
>> Write a program which tests theApocalypticnumber.
>> AnApocalypticnumberis:
>>     "Anumberof the form 2^n that contains the digits 666 (i.e., the
>> beastnumber) is called anapocalypticnumber.The first few such
>> powers are 157, 192, 218, 220, ..."
<snip>
> any solutions ??

Yes, how about you?  (We don't do coursework on demand.)

--
Ben.
```
 0
Reply ben.usenet (6515) 9/26/2008 4:25:23 PM

13 Replies
45 Views

(page loaded in 0.841 seconds)

2/17/2013 12:21:18 PM