cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A216603 Indices n for which A216557(n)=0, i.e., n does not reappear as substring in its orbit under A216556.

Original entry on oeis.org

20, 30, 40, 50, 60, 70, 80, 90, 100, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 158, 159
Offset: 1

Views

Author

M. F. Hasler, Sep 09 2012

Keywords

Comments

E. Angelini asked on the SeqFan list whether n=127 is in this sequence. The proof of the affirmative answer was given in the second reply to the post. (But "Lemma 2" should read: There is no n in the range of A216556 such that ...". Indeed, 2016,...,9016 also yield 127 as substring, but are not in A216556.) The same reasoning can be applied to terms 122,...,129.

Examples

			The number 0 is not in this sequence, because repeated application of A216556 yields 0 > 1 > ... > 9 > 10 which contains 0 as substring, after A216557(0)=10 iterations.
a(1)=20 is the least number which does not occur as a substring in its orbit under A216556. This is the case since no term in (the range of) A216556 may have "20" as a substring.
As explained in A216556 (and obvious from the definition), the digit "0" can only occur preceded by the digit "1". This also explains a(2)=30 through a(9)=100.
In A216557 it is explained why a(10)=111 and all numbers having this or 222,...,999 as substring are in this list.
To see why a(11)=112 and the following terms are in this list, observe that 112 itself has no preimage under A216556 (cf. A216587), and consider all possibilities for "patterns" in which it might occur: Obviously not followed by a digit 0, but possibly by a digit among 1,...,9; and maybe preceded by a digit among 2,...,9. However, all these cases lead to a preimage which has "00" as substring, and is therefore not in the range of A216556.
		

Crossrefs

A216556 Concatenate decimal digits of n, each increased by 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 22, 23, 24, 25, 26, 27, 28, 29, 210, 31, 32, 33, 34, 35, 36, 37, 38, 39, 310, 41, 42, 43, 44, 45, 46, 47, 48, 49, 410, 51, 52, 53, 54, 55, 56, 57, 58, 59, 510, 61, 62, 63, 64, 65, 66, 67, 68, 69, 610, 71, 72, 73, 74, 75, 76, 77
Offset: 0

Views

Author

M. F. Hasler, Sep 08 2012

Keywords

Comments

In all of the terms, a digit '0' can only occur preceded by a digit '1', and an initial digit '1' can only appear followed by a '0'.
Sequence A216589 lists the complement of the range of this map.
This is an injective map, A216587 is its left inverse. - M. F. Hasler, Sep 09 2012

Examples

			a(19) = concat(1+1,9+1) = 210.
		

Crossrefs

Programs

  • Mathematica
    Array[FromDigits@ Flatten[IntegerDigits[#] + 1 /. 10 -> {1, 0}] &, 91, 0] (* Michael De Vlieger, Jan 04 2020 *)
  • PARI
    A216556(n)={my(t=1);until(n
    				

A216587 Preimage of n for A216556 (i.e., concatenation of digits of a(n), each increased by 1, yields n), -1 if there is none.

Original entry on oeis.org

-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
Offset: 0

Views

Author

M. F. Hasler, Sep 09 2012

Keywords

Comments

Also: Left inverse to A216556: A216587 o A216556 = id.
Sequence A216589 lists the indices n for which a(n)=-1, i.e., n is not in the range of A216556.

Examples

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

Crossrefs

See also A216557.

Programs

  • PARI
    A216587(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}

Formula

a(A216556(n))=n for all n.
a(n)=n-1 for n < 11; a(n)=n-11 for 20 < n < 110 except n=30, 40, ..., 100.
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.

A216589 Numbers n which don't have a preimage for A216556, i.e., such that A216587(n)=-1.

Original entry on oeis.org

0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148
Offset: 1

Views

Author

M. F. Hasler, Sep 09 2012

Keywords

Comments

Concretely, numbers having "20", "30", ..., "90" or "00" as a substring, or starting with "11", "12", ... "19", and the number 0.
Note that A216557 does not necessarily yield 0 for these numbers, e.g., 10 has no preimage for A216556, but 210 does have, and 10 -> 21 -> ... -> 98 -> 109.

Programs

  • PARI
    is_A216589(n)={n || return(1); n=Vec(Str(n)); n[1]<"2" & 1<#n & n[2]>"0" & return(1); for(i=2,#n, n[i]=="0" || next; n[i-1]=="1" || return(1))}

Formula

A216587(n)=-1 if and only if n is in this sequence.
Showing 1-4 of 4 results.