A234691 Decimal value of the bitmap of active segments in 7-segment display of the number n, variant 1: bits 0-6 refer to segments from top to bottom, left to right.
119, 36, 93, 109, 46, 107, 123, 39, 127, 111, 4727, 4644, 4701, 4717, 4654, 4715, 4731, 4647, 4735, 4719, 12023, 11940, 11997, 12013, 11950, 12011, 12027, 11943, 12031, 12015, 14071, 13988, 14045, 14061, 13998, 14059, 14075, 13991, 14079, 14063, 6007, 5924, 5981, 5997
Offset: 0
Examples
The digits are assumed to be rendered as follows: _ _ _ _ _ _ _ _ | | | _| _| |_| |_ |_ | | |_| |_| |_| | |_ _| | _| |_| | |_| _| For example, a(7) = 39 = 2^0 + 2^1 + 2^2 + 2^5, because the nonzero bits are _ : bit 0, | | : bits 1+2, | : bit 5, while bits 3 (central '-'), 4 (lower left '|') and 6 (bottom '_') remain 0. For the digit '7', the "sans serif" representation (without the upper left '|') is also very common; it would correspond to a(7) = 37. Similarly, digits 6 and 9 are sometimes represented without the top resp. bottom bar, see comments.
Links
- Wikipedia, Seven-segment display.
Crossrefs
Programs
-
PARI
/* Bitmaps computed from 7-character strings. Extended beyond 9 with characters most frequently used to code hexadecimal digits A-F, chessboard coordinates a-h, and other letters. Alternate glyphs used more or less frequently: sans serif " 6 6666", "7 7 7 ", "9999 9 "; "a aaaaa", B same as 8, "eeeee e", g same as 9, H same as X, "i i i" or " i ", "J J JJJ" or "J J JJ", S same as 5, "TT T ", " YYY Y ". Note: Z below is the same as 2! */ bitmaps = { apply( s2b = s->sum(i=1,#s=Vec(s), if(s[i]>" ",2^(i-1))), ["000 000", " 1 1 ", "2 222 2", "3 33 33", " 444 4 ", "55 5 55", "66 6666", "777 7 ", "8888888", "9999 99", "AAAAAA ", " b bbbb", "CC CC", " ddddd", "EE EEEE", "FF FF ", "GG GGG", " h hhh ", " I I ", " J JJ", "KK KKK ", " L L L", "MMM MM ", " nnn ", " oooo", "PPPPP ", "qqqq q ", " rr ", " s ss", " t tt t", " uuu", " VV VVV", " XXXXX ", " YYY YY", "Z ZZZ Z"])} \\ Extended to letters by M. F. Hasler, Jun 16 2020 apply( {A234691(n)=bitmaps[n%10+1]+if(n>9,self()(n\10)<<7)}, [0..99]) \\ Extended to n > 9 by M. F. Hasler, Jun 17 2020
Formula
a(n) = a(n mod 10) + a(floor(n/10))*2^7 for n > 9. - M. F. Hasler, Jun 17 2020
Extensions
a(6) corrected thanks to Kevin Ryde, M. F. Hasler, Jun 16 2020
Edited and extended to n > 9 by M. F. Hasler, Jun 17 2020
Comments