Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Revision History for A216587

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Preimage of n for A216556 (i.e., concatenation of digits of a(n), each increased by 1, yields n), -1 if there is none.
(history; published version)
#11 by N. J. A. Sloane at Mon Jan 02 12:30:48 EST 2023
LINKS

E. Angelini, <a href="http://list.seqfan.eu/pipermailoldermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012

Discussion
Mon Jan 02
12:30
OEIS Server: https://oeis.org/edit/global/2957
#10 by M. F. Hasler at Sun Sep 23 17:19:05 EDT 2012
STATUS

editing

approved

#9 by M. F. Hasler at Sun Sep 23 17:19:01 EDT 2012
CROSSREFS

See also A216557.

#8 by M. F. Hasler at Sun Sep 09 12:05:11 EDT 2012
COMMENTS

Sequence A216589 lists the indices n for which a(n)=-1, i.e., n is not in the range of A216556.

CROSSREFS

See also A216557.

STATUS

approved

editing

Discussion
Sun Sep 16
21:23
OEIS Server: This sequence has not been edited or commented on for a week
yet is not proposed for review.  If it is ready for review, please
visit https://oeis.org/draft/A216587 and click the button that reads
"These changes are ready for review by an OEIS Editor."

Thanks.
  - The OEIS Server
#7 by M. F. Hasler at Sun Sep 09 11:55:24 EDT 2012
STATUS

proposed

approved

#6 by M. F. Hasler at Sun Sep 09 09:58:00 EDT 2012
STATUS

editing

proposed

Discussion
Sun Sep 09
11:55
M. F. Hasler: I "approve" this since there seems some interest on the subject and it would be useful if people could see this sequence. I hope this is not politically (nor mathematically) incorrect, else please revert...
#5 by M. F. Hasler at Sun Sep 09 09:56:48 EDT 2012
COMMENTS

Also: Left inverse to A216556: A216587 o A216556 = id.

FORMULA

a(A216556(n))=n for all n.

STATUS

proposed

editing

#4 by M. F. Hasler at Sun Sep 09 04:18:43 EDT 2012
STATUS

editing

proposed

#3 by M. F. Hasler at Sun Sep 09 04:17:41 EDT 2012
NAME

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.

DATA

-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

LINKS

E. Angelini, <a href="http://list.seqfan.eu/pipermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012

FORMULA

a(n)=n-1 for n < 11; a(n)=n-11 for 20 < n < 110 except n= 1030, 40, ..., 100.

EXAMPLE

a(a(a(2127)))=a(a(1016))=a(905)=-1, since under A216556, 905 -> 1016 -> 2127, but no n yields A216556(n)=905.

PROG

(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}

#2 by M. F. Hasler at Sun Sep 09 01:10:21 EDT 2012
NAME

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.)

DATA

-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

OFFSET

0,4

FORMULA

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.

PROG

(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}

KEYWORD

allocated

sign,base,easy

AUTHOR

M. F. Hasler, Sep 09 2012

STATUS

approved

editing