Wednesday, November 11, 2020

[fvpgxlwt] respectful numbers

capital letter F in ASCII or UTF-8 is 0x46 (hexadecimal) or 70 decimal.  a string of Fs in hexadecimal would be 0x46464646...  converting numbers of that form that to decimal yields the following decimal numbers, from 1 to 20 Fs: 70 17990 4605510 1179010630 301826721350 77267640665670 19780516010411590 5063812098665367110 1296335897258333980230 331861989698133498938950 84956669362722175728371270 21748907356856876986463045190 5567720283355360508534539568710 1425336392538972290184842129589830 364886116489976906287319585174996550 93410845821434088009553813804799116870 23913176530287126530445776334028573918790 6121773191753504391794118741511314923210310 1567173937088897124299294397826896620341839430

the sequence has formula 70*(256^n-1)/255.

because it is a 1-byte character being repeated, we do not have to worry about endianness.

similarly for lowercase f, 0x66 (hex), 102 (decimal): 102 26214 6710886 1717986918 439804651110 112589990684262 28823037615171174 7378697629483820646 1888946593147858085478 483570327845851669882470 123794003928538027489912422 31691265005705735037417580134 8112963841460668169578900514406 2076918743413931051412198531688038 531691198313966349161522824112137830 136112946768375385385349842972707284582 34844914372704098658649559801013064853094 8920298079412249256614287309059344602392166 2283596308329535809693257551119192218212394598

the hexadecimal digit 15 is commonly written as f.  the decimal values of 0xfff... are 15 255 4095 65535 1048575 16777215 268435455 4294967295 68719476735 1099511627775 17592186044415 281474976710655 4503599627370495 72057594037927935 1152921504606846975 18446744073709551615 295147905179352825855 4722366482869645213695 75557863725914323419135

the sequence has formula 16^n-1.

inspired by "press F to pay respects".  these are numbers to pay respects.

No comments :