E. Angelini, <a href="http://list.seqfan.eu/pipermailoldermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012
E. Angelini, <a href="http://list.seqfan.eu/pipermailoldermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012
editing
approved
See also A216557.
proposed
approved
editing
proposed
editing
proposed
Preimage of n for A216556, -1 if there is none. (Concatenation i.e., concatenation of digits of a(n), each increased by 1, yields n.), -1 if there is none.
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, 80, 81, 82, 83, 84, 85, 86, 87
E. Angelini, <a href="http://list.seqfan.eu/pipermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012
a(n)=n-1 for n < 11; a(n)=n-11 for 20 < n < 110 except n= 1030, 40, ..., 100.
(PARI) aA216587(n)={my(s=0); n!=1&for(i=1, #n=Vecsmall(Str(n)), n[i]>48||(i>1&n[i-1]==49&s=s\10+1)||return(-1); (s=s*10+n[i]-49)&next; (i<#n&n[i++]==48&s=9)||return(-1)); s}
]==48&s=9)||return(-1)); s}
allocated for M. F. Hasler
Preimage of n for A216556, -1 if there is none. (Concatenation of digits of a(n), each increased by 1, yields n.)
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, 80, 81, 82, 83, 84, 85, 86, 87
0,4
a(n)=n-1 for n <= 10.
a(n)=-1 if n contains a substring "20", "30",..., "90" or "00", or if n starts with digits "11", "12", ..., "19". For all other n>1 one has a(n)>0.
(PARI) a(n)={my(s=0); n!=1&for(i=1, #n=Vecsmall(Str(n)), n[i]>48||(i>1&n[i-1]==49&s=s\10+1)||return(-1); (s=s*10+n[i]-49)&next; (i<#n&n[i++
]==48&s=9)||return(-1)); s}
allocated
sign,base,easy
M. F. Hasler, Sep 09 2012
approved
editing