OFFSET
5,1
COMMENTS
a(n) is undefined for n<5, as there are no numbers with 1 segment, 1 with 2 segments, 1 with 3 segments, and 2 with 4 segments. If 0 is excluded as a valid input - so the series would refer to "the n-th positive number" - then a(6) would be 111 rather than 77.
LINKS
EXAMPLE
For n=7, 47 is the 7th positive number to light 7 segments, after 8, 12, 13, 15, 21, and 31.
PROG
(JavaScript) s=[6, 2, 5, 5, 4, 5, 6, 3, 7, 6]; p=[]; a=[]; for(i=2; i<=100; i++)p[i]=0; for(i=1; i<=1000000; i++){d=i; n=0; do{x=d%10; n+=s[x]; d=(d-x)/10; }while(d>0)p[n]++; if(p[n]==n)a[n]=i; }for(c=2; c<=40; c++)document.write(c+": "+a[c]+"<br>");
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Graham Holmes, Dec 13 2020
STATUS
approved