login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 11

%I #41 Mar 09 2024 10:31:32

%S 119,36,93,109,46,107,123,39,127,111,4727,4644,4701,4717,4654,4715,

%T 4731,4647,4735,4719,12023,11940,11997,12013,11950,12011,12027,11943,

%U 12031,12015,14071,13988,14045,14061,13998,14059,14075,13991,14079,14063,6007,5924,5981,5997

%N 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.

%C The bits 0-6 are assigned to the segments as follows: top (bit 0), upper left, upper right, middle, lower left, lower right, bottom (bit 6). Other conventions are common in engineering (as well for the segment-to-bit correspondence as for the glyphs), see sequence A234692 (the so-called ABCDEF coding), Wikipedia and the Example for a(7).

%C For n > 9, the decimal representation of n is encoded using a group of 7 bits for each digit, e.g., a(10) = a(1)*2^7 + a(0).

%C The sequence could have been extended differently to indices > 9, for example, by coding 7-segment representations of upper- and/or lowercase letters, as used for hexadecimal and base-64 representation.

%C The Hamming weight A000120 of the terms of this sequence yields the count of lit segments, A010371(n) = A000120(A234691(n)) = A000120(A234692(n)). For that sequence, 4 other variants are in the OEIS, depending on the number of segments used to represent digits 6, 7 and 9: A063720 (6', 7', 9'), A277116 (7', 9'), A074458 (9') and A006942 (7'), where x' means that the "sans serif" variant (one segment less than here) is used for digit x. - _M. F. Hasler_, Jun 17 2020

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Seven-segment_display">Seven-segment display</a>.

%F a(n) = a(n mod 10) + a(floor(n/10))*2^7 for n > 9. - _M. F. Hasler_, Jun 17 2020

%e The digits are assumed to be rendered as follows:

%e _ _ _ _ _ _ _ _

%e | | | _| _| |_| |_ |_ | | |_| |_|

%e |_| | |_ _| | _| |_| | |_| _|

%e For example, a(7) = 39 = 2^0 + 2^1 + 2^2 + 2^5, because the nonzero bits are

%e _ : bit 0,

%e | | : bits 1+2,

%e | : bit 5,

%e while bits 3 (central '-'), 4 (lower left '|') and 6 (bottom '_') remain 0.

%e 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.

%o (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! */

%o 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",

%o "EE EEEE", "FF FF ", "GG GGG", " h hhh ", " I I ", " J JJ", "KK KKK ",

%o " 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

%o 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

%Y Cf. A234692 for the "abcdefg" coding variant (clockwise from top and ending with bit 6 for the central "-").

%Y Cf. A010371 (number of segments lit), and variants A063720, A277116, A074458: see comments.

%Y Cf. A000120 (Hamming weight).

%K nonn,base

%O 0,1

%A _M. F. Hasler_, Dec 29 2013

%E a(6) corrected thanks to _Kevin Ryde_, _M. F. Hasler_, Jun 16 2020

%E Edited and extended to n > 9 by _M. F. Hasler_, Jun 17 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)