[go: up one dir, main page]

login
A039942
Number of points needed to display n on the LCD (liquid-crystal display) of a TI-83 calculator.
1
19, 10, 14, 14, 14, 17, 15, 11, 17, 15, 29, 20, 24, 24, 24, 27, 25, 21, 27, 25, 33, 24, 28, 28, 28, 31, 29, 25, 31, 29, 33, 24, 28, 28, 28, 31, 29, 25, 31, 29, 33, 24, 28, 28, 28, 31, 29, 25, 31, 29, 36, 27, 31, 31, 31, 34, 32, 28, 34, 32, 34, 25, 29, 29, 29, 32, 30, 26, 32
OFFSET
0,1
COMMENTS
a(15) = a(1) + a(5);
a(29) = a(2) + a(9) = 29 is the unique term such that a(n) = n.
a(10*n+u) = a(n) + a(u) where n >= 1 is a number and u a digit. - Jean-Marc Rebert, Aug 02 2015
EXAMPLE
_XXX____X_
X___X__XX_
X__XX___X_
X_X_X___X_
XX__X___X_
X___X___X_
_XXX___XXX
MATHEMATICA
Table[DigitCount[n].{10, 14, 14, 14, 17, 15, 11, 17, 15, 19}, {n, 0, 68}] (* Michael De Vlieger, Feb 02 2017 *)
PROG
(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
(Python)
def A039942(n):
....s=0
....for i in str(n):
........s+=[19, 10, 14, 14, 14, 17, 15, 11, 17, 15][int(i)]
....return s # Indranil Ghosh, Feb 02 2017
CROSSREFS
Sequence in context: A006232 A260328 A122549 * A269260 A050276 A107808
KEYWORD
easy,nonn,base
EXTENSIONS
More terms from David Wasserman, Feb 04 2002
STATUS
approved