A234692 Decimal value of the bitmap of active segments in 7-segment display of the number n, variant 2 ("abcdefg" scheme: bits represent segments in clockwise order).
63, 6, 91, 79, 102, 109, 125, 39, 127, 111, 831, 774, 859, 847, 870, 877, 893, 807, 895, 879, 11711, 11654, 11739, 11727, 11750, 11757, 11773, 11687, 11775, 11759, 10175, 10118, 10203, 10191, 10214, 10221, 10237, 10151, 10239, 10223, 13119, 13062, 13147, 13135, 13158
Offset: 0
Examples
a(7) = 39 = 2^0 + 2^1 + 2^2 + 2^5, because the digit 7 is represented as " _ " : bit 0, "| |" : bits 5+1, " |" : bit 2, and no bit 3 (bottom "_") nor 4 (lower left "|") nor 6 (central "-"). Although other glyphs do exist as well for 6, 9, 0 and maybe other digits, "7" is probably the digit where an alternate representation (without the upper left "|") is as common as the one we chose here.
Links
- Wikipedia, Seven-segment display.
Crossrefs
Programs
-
PARI
bitmap=apply(s->sum(i=1,#s=Vec(s),if(s[i]>" ",2^(i-1))), ["000000"," 11", "22 22 2", "3333 3", " 44 44", "5 55 55", "6 66666", "777 7", "8888888", "9999 99", "AAA AAA", " bbbbb", "C CCC "," dddd d", "E EEEE", "F FFF"]) \\ Could be extended to more alphabetical glyphs, see A234691. apply( {A234692(n)=bitmap[n%10+1]+if(n>9,self()(n\10)<<7)}, [0..99]) \\ M. F. Hasler, Jun 17 2020
Formula
a(n) = a(n mod 10) + a(floor(n/10))*2^7. - M. F. Hasler, Jun 17 2020
Extensions
Extended with hex digits (AbCdEF) to n=15 by M. F. Hasler, Dec 30 2013
a(10) and a(11) corrected thanks to Kevin Ryde, M. F. Hasler, Jun 16 2020
Definition changed for consistency with A010371, etc. by M. F. Hasler, Jun 17 2020
Comments