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

A303576 a(n) = prime arising when A231442(n+1) is formed (if there is more than one, use the smallest).

Original entry on oeis.org

13, 23, 29, 59, 151, 181, 281, 241, 47, 67, 601, 1013, 1153, 1451, 1471, 1187, 1861, 1619, 1129, 2221, 2203, 2003, 2203, 2243, 4229, 2269, 2267, 5227, 1523, 1283, 2383, 2333, 3253, 6353, 3463, 3347, 3739, 3389, 1483, 2441, 4243, 5443, 4457, 4447, 4451, 4051
Offset: 1

Views

Author

N. J. A. Sloane, Apr 27 2018

Keywords

Comments

Let A231442(n) = X, A231442(n+1) = Y. The digits of X and Y can be rearranged to form a prime, possibly in several ways; a(n) is the smallest such prime.

Crossrefs

Cf. A231442.

Extensions

More terms from Rémy Sigrist, Apr 29 2018

A228410 The digits of a(n) and a(n+1) together can be reordered to form a palindrome; lexicographically least injective sequence of positive integers with this property.

Original entry on oeis.org

1, 10, 100, 11, 2, 12, 21, 102, 20, 101, 22, 3, 13, 31, 103, 30, 110, 33, 4, 14, 41, 104, 40, 114, 24, 42, 112, 23, 32, 113, 34, 43, 131, 35, 5, 15, 51, 105, 50, 115, 25, 52, 121, 26, 6, 16, 61, 106, 60, 116, 36, 63, 136, 163, 316, 361, 613, 631, 1003, 111, 17, 7, 27, 72, 117, 37, 73, 137, 71, 107
Offset: 1

Views

Author

M. F. Hasler, Nov 09 2013

Keywords

Comments

For each n=1,2,3..., choose the smallest positive integer a(n) not occurring earlier such that the digits of a(n) and the preceding term (none for n=1) taken together can form a palindrome, when suitably reordered.
This is a variant of the original version, proposed by E. Angelini, based on nonnegative integers (cf. A228407). The two sequences start with only a few terms differing and large segments in common, and one might have expected them to join a common orbit quite early, but they rather diverge more and more.
It is conjectured that the sequence is a permutation of the positive integers, i.e., that all numbers will eventually occur. To test this conjecture, one can consider the indices n at which occur the numbers equal to the smallest integer not yet used. 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: [1, 1], [5, 2], [12, 3], [19, 4], [35, 5], [45, 6], [62, 7], [78, 8], [88, 9], [89, 29], [92, 39], [118, 44], [149, 45], [187, 46], [314, 47], [432, 49], [477, 59], [506, 67], [507, 76], [521, 78], [531, 79], [572, 89], [573, 98], [574, 198], [954, 211][955, 222], [956, 233], [1602, 234], [1616, 235], [1623, 237], [1924, 238], [1959, 239], [2508, 258], [2515, 278], [2536, 279], [4046, 289], [4047, 298], [4053, 489], [4054, 498], ...
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.
Sequences A231433 and A231442 are variants where "palindrome" is replaced with "prime".

Crossrefs

Programs

  • PARI
    {u=0; a=1; for(n=1,99, u+=1<
    				
  • Python
    from collections import Counter
    A228410_list, l, s, b = [1], Counter('1'), 2, set()
    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:
                    A228410_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
Showing 1-2 of 2 results.