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.

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

Original entry on oeis.org

101, 211, 23, 13, 41, 47, 67, 601, 109, 59, 251, 281, 881, 1381, 1153, 1451, 1471, 2017, 2203, 1223, 1621, 1619, 1229, 2203, 2053, 5227, 2267, 2269, 4229, 1423, 1283, 2383, 2333, 3253, 6353, 3463, 3347, 3739, 3389, 1483, 2441, 4243, 5443, 4457, 4447, 4451
Offset: 0

Views

Author

N. J. A. Sloane, Apr 27 2018

Keywords

Comments

Let A231433(n) = X, A231433(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. A231433.

Extensions

More terms from Rémy Sigrist, Apr 29 2018

A128280 a(n) is the least number not occurring earlier such that a(n)+a(n-1) is prime, a(0) = 0.

Original entry on oeis.org

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

Views

Author

Zak Seidov, May 03 2007

Keywords

Comments

Original definition: start with a(1) = 2. See A055265 for start with a(1) = 1.
The sequence may well be a rearrangement of natural numbers. Interestingly, subsets of first n terms are permutations of 1..n for n = {2, 4, 8, 10, 18, 22, 24, 56, ...}. E.g., first 56 terms: {2, 1, 4, 3, 8, 5, 6, 7, 10, 9, 14, 15, 16, 13, 18, 11, 12, 17, 20, 21, 22, 19, 24, 23, 30, 29, 32, 27, 26, 33, 28, 25, 34, 37, 36, 31, 40, 39, 44, 35, 38, 41, 42, 47, 50, 51, 46, 43, 54, 49, 48, 53, 56, 45, 52, 55} are a permutation of 1..56.
Without altering the definition nor the existing values, one can as well start with a(0) = 0 and get (conjecturally) a permutation of the nonnegative integers. This sequence is in some sense the "arithmetic" analog of the "digital" variant A231433: Here we add subsequent terms, there the digits are concatenated. - M. F. Hasler, Nov 09 2013
The sequence is also a particular case of "among the pairwise sums of any M consecutive terms, N are prime", with M = 2, N = 1. For other M, N see A329333, A329405 ff, A329449 ff and the OEIS Wiki page. - M. F. Hasler, Nov 24 2019

Crossrefs

Cf. A083236.
Cf. A055265 for the variant starting with a(1) = 1, and A329333, A329405, ..., A329425 and A329449, ..., A329581 for other variants. - M. F. Hasler, Nov 24 2019

Programs

  • PARI
    {a=0;u=0; for(n=1, 99, u+=1<
    				

Formula

a(2n-1) = A055265(2n-1) + 1, a(2n) = A055265(2n) - 1, for all n >= 1. - M. F. Hasler, Feb 11 2020

Extensions

Initial a(0) = 0 prefixed by M. F. Hasler, Nov 09 2013

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

A231442 The digits of a(n) and a(n+1) taken together are the digits of a prime; least permutation of the positive integers with this property.

Original entry on oeis.org

1, 3, 2, 9, 5, 11, 8, 12, 4, 7, 6, 10, 13, 15, 14, 17, 18, 16, 19, 21, 22, 30, 20, 23, 24, 29, 26, 27, 25, 31, 28, 33, 32, 35, 36, 34, 37, 39, 38, 41, 42, 43, 45, 47, 44, 51, 40, 49, 46, 57, 50, 53, 48, 59, 56, 63, 52, 61, 54, 67, 55, 69, 58, 70, 60, 71, 62, 72, 64, 73, 66, 79, 75, 65, 74, 68, 77
Offset: 1

Views

Author

M. F. Hasler, Nov 09 2013

Keywords

Examples

			Start with a(1)=1. The same number cannot be used twice, so the least prime that can be made with this digit is 13, so a(2)=3.
		

Crossrefs

Cf. A231433 (analog for nonnegative integers).

Programs

  • PARI
    {a=1;u=0;for(n=1,99,u+=1<"0"&&(a=k)&&next(3))))}
Showing 1-4 of 4 results.