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.

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.

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
    				

A216557 Number of iterations of A216556 until the initial value n appears as a substring of the iterate; 0 if this will never happen.

Original entry on oeis.org

10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 19, 28, 37, 46, 55, 64, 73, 82, 90, 0, 9, 19, 28, 37, 46, 55, 64, 73, 82, 0, 89, 9, 19, 28, 37, 46, 55, 64, 73, 0, 79, 89, 9, 19, 28, 37, 46, 55, 64, 0, 69, 79, 89, 9, 19, 28, 37, 46, 55, 0, 59, 69, 79, 89, 9, 19, 28, 37, 46, 0, 49, 59, 69, 79, 89, 9, 19, 28, 37, 0, 39, 49, 59, 69, 79, 89, 9, 19, 28, 0, 29, 39, 49, 59, 69, 79
Offset: 0

Views

Author

M. F. Hasler, Sep 08 2012

Keywords

Comments

Can someone prove (and maybe strengthen) the following conjecture: a(n) = 0 whenever A216587(m) = -1 for all m obtained by concatenating any digit to the left and any digit to the right of n.
From Lars Blomberg, Jan 01 2020: (Start)
The nonzero a(n) take only 18 different values: (9, 10, 19, 28, 29, 37, 39, 46, 49, 55, 59, 64, 69, 73, 79, 82, 89, 90). For n < 10^12 the corresponding counts are (108, 75, 829, 388, 306, 326, 302, 289, 291, 277, 303, 265, 315, 254, 327, 245, 339, 2). Specifically a(19) = a(210) = 90.
Nonzero terms are becoming increasingly sparse. For k = 1..12 the number of nonzero a(n) for n < 10^k is (10, 92, 247, 489, 797, 1194, 1678, 2236, 2860, 3565, 4359, 5421). (End)

Examples

			a(211) = 9 since under the action of A216556, 211 -> 322 -> 433 -> 544 -> 655 -> 766 -> 877 -> 988 -> 1099 -> 211010, which contains the substring 211.
a(111) = 0 since if some number has "111" as its substring, then its preimage for A216556 (cf. A216587) contains at least the substring "00" (e.g., A216587(21110) = 1009), and has in turn no preimage under A216556. Therefore 111 cannot occur as a substring in the orbit of any number under A216556.
		

Crossrefs

See A216603 for the list of n such that a(n) = 0. - M. F. Hasler, Sep 09 2012

Programs

  • PARI
    A216557(n, L=9e9, f)={my(s=Mod(n,10^#Str(n)), t=n); n && until(20>t\=10, t%1000%111||return; t%10 || t%100==10 || return); for(i=1,L, t=n=A216556(n); until(!t\=10, s==t && return(i))); f} \\ 3rd (optional) argument f allows to specify a return value (e.g., f=[] or -1) in case no result is found within the limit of L iterations. If the zero result is deduced from the initial value (cf. FORMULA) the function returns an empty result (which also evaluates to 0). [PARI syntax updated Jan 02 2020]

Formula

a(n)=0 for all numbers having "20", "30", ..., "90" or "00" or "111", "222", ... "999" as a substring.

Extensions

Corrected typo in a(69): 4 -> 46 by Lars Blomberg, Jan 01 2020

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

Showing 1-4 of 4 results.