Keith said:
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.
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