cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A074459 Number of segments which change from display of a number n to the next number n+1 on a 7-segment display: version where '6', '7', '9' use 6, 4, resp. 5 segments.

This page as a plain text file.
%I A074459 #16 Aug 16 2025 03:18:43
%S A074459 4,5,2,3,3,1,4,3,2,5,4,5,2,3,3,1,4,3,2,8,4,5,2,3,3,1,4,3,2,5,4,5,2,3,
%T A074459 3,1,4,3,2,6,4,5,2,3,3,1,4,3,2,6,4,5,2,3,3,1,4,3,2,4,4,5,2,3,3,1,4,3,
%U A074459 2,7,4,5,2,3,3,1,4,3,2,6,4,5,2,3,3,1,4,3,2,5
%N A074459 Number of segments which change from display of a number n to the next number n+1 on a 7-segment display: version where '6', '7', '9' use 6, 4, resp. 5 segments.
%C A074459 The glyph variants used here are the same as in A074458 (other variants are described in A006942, A010371, A063720 and A277116). - _M. F. Hasler_, Jun 17 2020
%F A074459 For n % 10 < 9, a(n) = a(n % 9), where % is the modulo (remainder) operator. - _M. F. Hasler_, Jun 23 2020
%e A074459 Consider the representations of digits '0', '1' and '2' given below.
%e A074459 To change from 0 to 1, we need to delete 4 segments, from 1 to 2, we need to delete 1 segment and add 4 segments, so 5 segments in total are needed to be changed.
%e A074459 From _M. F. Hasler_, Jun 23 2020: (Start)
%e A074459 We consider the following 7-segment representations of the digits 0 - 9:
%e A074459    _       _   _       _   _   _   _   _
%e A074459   | |   |  _|  _| |_| |_  |_  | | |_| |_|
%e A074459   |_|   | |_   _|   |  _| |_|   | |_|   | .
%e A074459 To switch from displaying number 9 to displaying number 10, one has to activate 2 segments for the additional digit '1', and change 3 segments from the representation of '9' to get that of '0', whence a(9) = 2 + 3 = 5.
%e A074459 To switch from 19 to 20 one has a(19) = a(1) + 3 = 8. (End)
%o A074459 (PARI) apply( {A074459(n)=if(n%10<9,digits(452331432)[n%10+1],n>9,3+self()(n\10),5)}, [0..99]) \\ _M. F. Hasler_, Jun 23 2020
%Y A074459 Cf. A074458.
%K A074459 nonn,base
%O A074459 0,1
%A A074459 Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 22 2002
%E A074459 Edited and terms for n > 8 added by _M. F. Hasler_, Jun 23 2020