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-6 of 6 results.

A231889 Base 2 analog of A231880 (written in base 2).

Original entry on oeis.org

0, 10, 101, 100, 1, 1001, 111, 1010, 1000, 11, 10000, 110, 1011, 10001, 1101, 10010, 1110, 10011, 1100, 10101, 10100, 1111, 11000, 10110, 11001, 11010, 11100, 100001, 10111, 100000, 11011, 100010, 11101
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2013

Keywords

Comments

A231889 (and A231890) eventually merges with A231891 (and A231892). For n>30, a(n) = A231891(n-1). - Hans Havermann, Nov 18 2013

Crossrefs

Extensions

More terms from Hans Havermann, Nov 18 2013

A231890 Terms of A231889 (base-2 analog of A231880) written in base 10.

Original entry on oeis.org

0, 2, 5, 4, 1, 9, 7, 10, 8, 3, 16, 6, 11, 17, 13, 18, 14, 19, 12, 21, 20, 15, 24, 22, 25, 26, 28, 33, 23, 32, 27, 34, 29, 35, 30, 36, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 47, 49, 50
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2013

Keywords

Comments

A231889 (and A231890) eventually merges with A231891 (and A231892). For n > 30, a(n) = A231892(n-1). - Hans Havermann, Nov 18 2013

Crossrefs

Extensions

More terms from Hans Havermann, Nov 18 2013

A228407 The digits of a(n) and a(n+1) together can be reordered to form a palindromic integer; the lexicographically earliest injective sequence of nonnegative integers with this property.

Original entry on oeis.org

0, 11, 1, 10, 100, 12, 2, 20, 101, 22, 3, 13, 31, 103, 30, 110, 33, 4, 14, 41, 104, 40, 114, 24, 42, 112, 21, 102, 120, 201, 210, 1000, 105, 15, 5, 25, 52, 115, 35, 53, 113, 23, 32, 121, 26, 6, 16, 61, 106, 60, 116, 36, 63, 131, 34, 43, 134, 143, 314
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Nov 09 2013

Keywords

Comments

For each n=0,1,2,3..., choose the smallest nonnegative integer a(n) not occurring earlier such that the digits of a(n) and a(n-1) (none for n=0) taken together can form a palindrome when suitably reordered.
It is conjectured that the sequence is a permutation of the nonnegative integers (motivating the choice of offset 0), i.e., that all numbers will eventually occur. (The conjecture is true - see below. - N. J. A. Sloane, Nov 12 2013)
To test this conjecture, consider the indices n where the smallest integers not yet used occur. If the conjecture is true, this is equivalent to a(m)>a(n) for all m>n; if not, then this list ends at the first missing number. These [n,a(n)] are: [0, 0], [2, 1], [6, 2], [10, 3], [17, 4], [34, 5], [45, 6], [65, 7], [81, 8], [118, 9], [119, 29], [122, 39], [145, 44], [152, 45], [197, 46], [230, 47], [271, 48], [362, 49], [533, 57], [740, 58], [754, 68], [816, 69], [855, 89], [856, 98], [857, 198], [1011, 211], [1012, 222], [1110, 224], [1232, 225], [1385, 234], [1406, 236], [1413, 237], [1767, 238], [1921, 239], [2555, 257], [2590, 259], [2597, 269], [4354, 279], [4355, 297], [4361, 379], [4362, 397], [4368, 479], [4369, 497],...
See A228410 for the variant considering only positive integers, and comments about the differences.
Sequence A228412 is an "arithmetic" variant, where instead of the union of the digits, the sum of terms is considered. Sequence A062932 is a further variant where injectivity is replaced by monotonicity.
From N. J. A. Sloane, Nov 13 2013: (Start)
Theorem. In any base b >= 2, Eric Angelini's "palindrome" sequence (A228407 in base 10, A230891 and A230892 in base 2) contains every number n >= 0 and is therefore a permutation of the numbers n >= 0.
Proof. Fix the base b >= 2. Classify numbers n into 2^b classes according to the parity of the numbers of 0's, 1's, ..., b-1's they contain.
Construct a graph G with these 2^b classes as nodes, with two nodes joined by an edge iff they are at Hamming distance 0 or 1 apart. This is the b-dimensional cube graph with a loop at each node.
Let S = a(0), a(1), ... denote Angelini's palindromic sequence in base b. A set of digits can be arranged to form a palindrome iff there is an even number of copies of every digit or exactly one of the digits occurs an odd number of times.
At step n, write a(n) on the node of G corresponding to its parity class. The previous remark implies that the successive a(i) will trace out an infinite path in the graph.
At least one node must be visited infinitely often.
The rule for constructing the sequence implies that each node adjacent to a node that is visited infinitely often must also be visited infinitely often. Since G is connected, every node is visited infinitely often. Therefore every number must appear in the sequence, for if a number never appeared, the node corresponding to its parity class would only be visited finitely many times. QED.
Thanks to Rob Arthan for comments on the original version of this proof. (End)
From Robert G. Wilson v, Dec 31 2013: (Start)
Records: 0, 11, 100, 101, 103, 110, 114, 120, 201, 210, 1000, 1003, 1007, 1008, 1020, 1029, 1030, 1040, 1047, 1048, 1082, 1208, 1280, 1802, 1820, 2018, 2081, 2108, 2180, 2801, 2810, 8012, 8021, 8102, 8120, 8201, 8210, 10002, 10004, 10007, 10020, 10060, 10080, 10081, 10100, 10105, 10113, 10304, ... [See A377925, A377926. - N. J. A. Sloane, Dec 14 2024]
Last occurrence: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 29, 39, 44, 45, 46, 47, 48, 49, 57, 58, 68, 69, 89, 98, 198, 211, 222, 224, 225, 234, 236, 237, 238, 239, 257, 259, 269, 279, 297, 379, 397, 479, 497, 589, ... ;
Index of last occurrence: 0, 2, 6, 10, 17, 34, 45, 65, 81, 118, 119, 122, 145, 152, 197, 230, 271, 362, 533, 740, 754, 816, 855, 856, 857, 1011, 1012, 1110, 1232, 1385, 1406, 1413, 1767, 1921, 2555, 2590, 2597, 4354, 4355, 4361, 4362, 4368, 4369, ... . (End)

Examples

			The second term cannot be "1", because a palindrome cannot be formed from the digits in "01". The second term cannot be "10" because "010", though a palindrome, is not a palindromic integer. However "11" is permissible because "101" is a palindrome. Thus the second term is 11.
The third term can be 1 because 111 is a palindrome.
		

Crossrefs

A228730, A231880, A231881 are similar sequences.
Records: A377925, A377926.

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits@ a[n - 1]}, Label[ start]; While[ MemberQ[ a@# & /@ Range[n - 1], k], k++]; While[ idk = IntegerDigits @k; Select[ Permutations[ Join[idm, idk]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[start]]; k]; Array[ a, 60, 0] (* Robert G. Wilson v, Nov 10 2013 *)
  • PARI
    {u=0; a=0; for(n=1,99, u+=1<
    				
  • Python
    from collections import Counter
    A228407_list, l, s, b = [0, 11], Counter('11'), 1, set([11])
    for _ in range(10**2):
        i = s
        while True:
            if i not in b:
                li, o = Counter(str(i)), 0
                for d in (l+li).values():
                    if d % 2:
                        if o > 0:
                            break
                        o += 1
                else:
                    A228407_list.append(i)
                    l = li
                    b.add(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
            i += 1 # Chai Wah Wu, Dec 14 2014

Extensions

Terms independently calculated by Rob Arthan, Nov 09 2013
Comments edited by N. J. A. Sloane, Dec 14 2024

A231881 The digits of a(n) and a(n+1) together can be reordered to form a square; lexicographically earliest sequence of distinct positive integers with this property.

Original entry on oeis.org

1, 6, 3, 16, 9, 4, 14, 8, 29, 5, 2, 11, 25, 12, 15, 21, 37, 69, 13, 27, 19, 26, 10, 24, 30, 42, 39, 52, 20, 34, 18, 28, 81, 43, 36, 31, 48, 7, 56, 47, 61, 33, 46, 17, 23, 40, 32, 49, 60, 57, 22, 45, 63, 54, 67, 41, 38, 44, 62, 55, 126, 58, 108, 76, 50, 92, 35, 64
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2013, based on a posting to the Sequence Fans Mailing List by Andrew Weimholt, Nov 12 2013

Keywords

Comments

A231880 and A231881 eventually merge: A231881(2539) = 2541; A231880(2540) = 2536; A231881(2540,2541,..) = A231880(2541,2542,..) = 2544,2551,.. Hans Havermann, Nov 17 2013

Crossrefs

A variant of A228407. Cf. A231880.

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits@ a[n - 1], t = a@# & /@ Range[0, n - 1]}, Label[start]; While[ MemberQ[t, k], k++]; While[ Select[ Permutations[ Join[idm, IntegerDigits[ k]]], #[[1]] != 0 && IntegerQ[ Sqrt[ FromDigits[ #]]] &] == {}, k++; Goto[start]]; k]; Array[a, 100, 0] (* Robert G. Wilson v, Nov 17 2013 *)

Extensions

Corrected and extended by Hans Havermann, Nov 17 2013

A231891 Base-2 analog of A231881 (written in base 2).

Original entry on oeis.org

1, 100, 11, 1000, 10, 101, 1011, 110, 1101, 10001, 1110, 10010, 1111, 10000, 111, 1001, 1010, 1100, 10011, 10100, 10101, 10110, 11000, 10111, 100000, 11011, 100001, 11001, 11010, 11100, 100010, 11101, 100011
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2013

Keywords

Comments

A231889 (and A231890) eventually merges with A231891 (and A231892). For n > 29, a(n) = A231889(n+1). - Hans Havermann, Nov 18 2013

Crossrefs

Extensions

More terms from Hans Havermann, Nov 18 2013

A231892 Terms of A231891 (base-2 analog of A231881) written in base 10.

Original entry on oeis.org

1, 4, 3, 8, 2, 5, 11, 6, 13, 17, 14, 18, 15, 16, 7, 9, 10, 12, 19, 20, 21, 22, 24, 23, 32, 27, 33, 25, 26, 28, 34, 29, 35, 30, 36, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 47, 49, 50, 51
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2013

Keywords

Comments

A231889 (and A231890) eventually merges with A231891 (and A231892). For n > 29, a(n) = A231890(n+1). - Hans Havermann, Nov 18 2013

Crossrefs

Formula

For n > 29, a(n) = A231890(n+1). - Hans Havermann, Nov 18 2013

Extensions

More terms from Hans Havermann, Nov 18 2013
Showing 1-6 of 6 results.