%I #34 Sep 19 2020 22:58:57
%S 19,10,14,14,14,17,15,11,17,15,29,20,24,24,24,27,25,21,27,25,33,24,28,
%T 28,28,31,29,25,31,29,33,24,28,28,28,31,29,25,31,29,33,24,28,28,28,31,
%U 29,25,31,29,36,27,31,31,31,34,32,28,34,32,34,25,29,29,29,32,30,26,32
%N Number of points needed to display n on the LCD (liquid-crystal display) of a TI-83 calculator.
%C a(15) = a(1) + a(5);
%C a(29) = a(2) + a(9) = 29 is the unique term such that a(n) = n.
%C a(10*n+u) = a(n) + a(u) where n >= 1 is a number and u a digit. - _Jean-Marc Rebert_, Aug 02 2015
%H Indranil Ghosh, <a href="/A039942/b039942.txt">Table of n, a(n) for n = 0..50000</a>
%H <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a>
%e _XXX____X_
%e X___X__XX_
%e X__XX___X_
%e X_X_X___X_
%e XX__X___X_
%e X___X___X_
%e _XXX___XXX
%t Table[DigitCount[n].{10, 14, 14, 14, 17, 15, 11, 17, 15, 19}, {n, 0, 68}] (* _Michael De Vlieger_, Feb 02 2017 *)
%o (PARI) a(n)={if(n==0,return(19)); my(p=[19, 10, 14, 14, 14, 17, 15, 11, 17, 15], d=digits(n), s=0); for(j=1,#d,s+=p[d[j]+1]); s;} \\ _Joerg Arndt_, Aug 02 2015
%o (Python)
%o def A039942(n):
%o ....s=0
%o ....for i in str(n):
%o ........s+=[19,10,14,14,14,17,15,11,17,15][int(i)]
%o ....return s # _Indranil Ghosh_, Feb 02 2017
%K easy,nonn,base
%O 0,1
%A _Jean-Marc Rebert_
%E More terms from _David Wasserman_, Feb 04 2002