This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A302552 Number of segments needed to display the n-th prime number on a 7-segment LCD display. 0
 5, 5, 5, 3, 4, 7, 5, 8, 10, 11, 7, 8, 6, 9, 7, 10, 11, 8, 9, 5, 8, 9, 12, 13, 9, 10, 13, 11, 14, 9, 10, 9, 10, 13, 12, 9, 10, 13, 11, 10, 11, 11, 10, 13, 11, 14, 9, 15, 13, 16, 15, 16, 11, 12, 13, 16, 17, 10, 11, 14, 17, 16, 14, 9, 12, 10, 12, 13, 12, 15, 15 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS _       _   _       _   _   _   _   _           | |   |  _|  _| |_| |_  |_    | |_| |_|           |_|   | |_   _|   |  _| |_|   | |_|  _| . The largest known Mersenne prime number, M(77232917), is a 23249425-digit number that would require 113927186 segments to display in its entirety. If each segment required 1 mW of electrical power, then to display the entire number for an hour would require about 114 KWh of energy! LINKS FORMULA a(n) = A006942(A000040(n)). - Alois P. Heinz, Jun 20 2018 EXAMPLE For n = 6, prime(6) = 13, which has two digits: 1, 3. We need two segments for the 1 and five for the 3 (see the Comments section), so a(6) = 2 + 5 = 7. MAPLE a:= n-> add([6, 2, 5, 5, 4, 5, 6, 3, 7, 6][i+1], i=convert(ithprime(n), base, 10)): seq(a(n), n=1..100);  # Alois P. Heinz, Jun 20 2018 MATHEMATICA f[n_] := Plus @@ (IntegerDigits@n /. {0 -> 6, 1 -> 2, 2 -> 5, 3 -> 5, 7 -> 3, 8 -> 7, 9 -> 6}); f@# & /@ Prime@ Range@ 71 (* Robert G. Wilson v, Jun 20 2018 *) PROG (PARI) { v=vector(10); v=6; v=2; v=5; v=5; v=4; v=5; v=6; v=3; v=7; v=6; forprime(n=2, 1000,          d=digits(n, 10); s=0;          for(i=1, #d,              s+=v[d[i]+1];             )         ; print1(s", ")         ) } CROSSREFS Cf. A000040, A006942. Sequence in context: A094851 A173602 A054245 * A193887 A196998 A232614 Adjacent sequences:  A302549 A302550 A302551 * A302553 A302554 A302555 KEYWORD nonn,easy,base AUTHOR Dimitris Valianatos, Jun 20 2018 STATUS approved

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

Last modified August 20 05:25 EDT 2019. Contains 326139 sequences. (Running on oeis4.)