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-10 of 31 results. Next

A377925 Records in A228407.

Original entry on oeis.org

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, 10502, 10520, 11125, 11152, 11215, 11251, 11512, 11521, 12005, 12050, 12115, 12151
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2024

Keywords

Comments

First 48 terms were computed by Robert G. Wilson v, Dec 31 2013: see Comments in A228407.

Crossrefs

Programs

  • Python
    from itertools import islice
    from collections import Counter
    def A377925_gen(): # generator of terms
        yield from (0,11)
        l, s, b, c = Counter('11'), 1, {11}, 11
        while True:
            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:
                        if i>c:
                            yield (c:=i)
                        l = li
                        b.add(i)
                        while s in b:
                            b.remove(s)
                            s += 1
                        break
                i += 1
    A377925_list = list(islice(A377925_gen(),40)) # Chai Wah Wu, Dec 14 2024

A377926 Indices of records in A228407.

Original entry on oeis.org

0, 1, 4, 8, 13, 15, 22, 28, 29, 30, 31, 62, 78, 94, 108, 138, 169, 205, 238, 279, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 419, 519, 611, 667, 884, 3341, 3415, 3839, 4623, 4665, 5974, 5975, 5976, 5977, 5978, 5979, 5980, 5981, 5982, 5983, 5984, 5985, 5986, 5987, 5988, 5989, 5990, 5991, 5992, 5993, 5994, 5995, 5996, 5997, 5998
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2024

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    from collections import Counter
    def A377926_gen(): # generator of terms
        yield from (0,1)
        l, s, b, c, j = Counter('11'), 1, {11}, 11, 1
        while True:
            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:
                        j += 1
                        if i>c:
                            yield j
                            c = i
                        l = li
                        b.add(i)
                        while s in b:
                            b.remove(s)
                            s += 1
                        break
                i += 1
    A377926_list = list(islice(A377926_gen(),40)) # Chai Wah Wu, Dec 14 2024

A229218 Position of n in A228407.

Original entry on oeis.org

0, 2, 6, 10, 17, 34, 45, 65, 81, 118, 3, 1, 5, 11, 18, 33, 46, 64, 80, 117, 7, 26, 9, 41, 23, 35, 44, 66, 82, 119, 14, 12, 42, 16, 54, 38, 51, 69, 85, 122, 21, 19, 24, 55, 145, 152, 197, 230, 271, 362, 179, 155, 36, 39, 153, 146, 185, 533
Offset: 0

Views

Author

Robert G. Wilson v, Nov 10 2013

Keywords

Comments

The inverse sequence to A228407.

Examples

			a(0) = 0 since A228407(0) is 0;
a(1) = 2 since A228407(2) is 1;
a(2) = 6 since A228407(6) is 2;
a(11) = 1 since A228407(1) is 11; etc.
		

Crossrefs

Cf. A228407.

Programs

  • Mathematica
    (* do A228407 first, then *) lst = Array[a, 500, 0]; Flatten[ Table[ Position[lst, n], {n, 0, 57}] - 1]

A303571 a(n) = palindrome arising when A228407(n+1) is formed (if there is more than one, use the smallest).

Original entry on oeis.org

101, 111, 101, 10001, 10201, 212, 202, 10201, 12021, 232, 313, 1331, 13031, 30103, 10301, 13031, 343, 414, 1441, 14041, 40104, 14041, 14241, 2442, 12421, 12121, 12021, 102201, 102201, 102201, 1002001, 1005001, 15051, 515, 525, 2552, 15251, 15351, 3553, 13531
Offset: 0

Views

Author

N. J. A. Sloane, Apr 27 2018

Keywords

Comments

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

Crossrefs

Cf. A228407.

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Dec 27 2018

A228730 Lexicographically earliest sequence of distinct nonnegative integers such that the sum of two consecutive terms is a palindrome in base 10.

Original entry on oeis.org

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

Views

Author

Paul Tek, Aug 31 2013

Keywords

Comments

From M. F. Hasler, Nov 09 2013: (Start)
At each step, choose the smallest number not occurring earlier and such that a(n+1)+a(n) are palindromes, for all n.
Conjectured to be a permutation of the nonnegative integers.
See A062932 where injectivity is replaced by monotonicity; the sequences differ from a(16)=15 on.
This is an "arithmetic" analog to sequences A228407 and A228410, where instead of the sum, the union of the digits of subsequent terms is considered. (End)

Examples

			a(1) + a(2) = 3.
a(2) + a(3) = 5.
a(3) + a(4) = 7.
a(4) + a(5) = 9.
a(5) + a(6) = 11.
a(6) + a(7) = 22.
a(7) + a(8) = 33.
		

Crossrefs

Cf. A062932 (strictly increasing variant).

Programs

  • PARI
    {a=0;u=0; for(n=1, 99, u+=1<A002113(a+k)&&(a=k)&&next(2)))} \\ M. F. Hasler, Nov 09 2013
    
  • Perl
    See Link section.
    
  • Python
    from itertools import islice
    def ispal(n): s = str(n); return s == s[::-1]
    def agen(): # generator of terms
        aset, an, mink = {0}, 0, 1
        yield 0
        while True:
            k = mink
            while k in aset or not ispal(an + k): k += 1
            an = k; aset.add(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 70))) # Michael S. Branicky, Nov 07 2022

Extensions

a(0)=0 added by M. F. Hasler, Nov 15 2013

A230891 Working in base 2: a(0)=0, thereafter a(n+1) is the smallest number not already in the sequence such that the bits of a(n) and a(n+1) together can be rearranged to form a palindrome.

Original entry on oeis.org

0, 11, 1, 10, 100, 111, 1000, 101, 110, 1001, 1010, 1100, 1111, 10000, 1011, 1101, 1110, 10001, 10010, 10100, 10111, 11000, 11011, 11101, 11110, 100000, 10011, 10101, 10110, 11001, 11010, 11100, 11111, 100001, 100010, 100100, 100111, 101000, 101011, 101101, 101110, 110000, 110011, 110101, 110110, 111001
Offset: 0

Views

Author

N. J. A. Sloane, Nov 11 2013

Keywords

Comments

A binary version of A228407.
The palindrome must be a proper binary number, i.e. must begin with 1 (if it is > 0). Also, the union of the bits of a(n) and a(n+1) cannot contain both an odd number of 0's and an odd number of 1's.
Just as for A228407, we can ask: does every number appear? The answer is yes - see the Comments in A228407.

Crossrefs

Cf. A228407, A230892 (these numbers written in base 10).

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits[ a[n - 1], 2], t = a@# & /@ Range[n - 1]}, Label[ start]; While[ MemberQ[t, k], k++]; While[ Select[ Permutations[ Join[idm, IntegerDigits[k, 2]]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[start]]; k]; s = Array[a, 46, 0]; FromDigits@# & /@ IntegerDigits[s, 2] (* Robert G. Wilson v, Dec 31 2013 *)
  • Python
    from collections import Counter
    A230891_list, l, s, b = [0, 11], Counter('11'), 1, {3}
    for _ in range(30001):
        i = s
        while True:
            if i not in b:
                li, o = Counter(bin(i)[2:]), 0
                for d in (l+li).values():
                    if d % 2:
                        if o > 0:
                            break
                        o += 1
                else:
                    A230891_list.append(int(bin(i)[2:]))
                    l = li
                    b.add(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
            i += 1 # Chai Wah Wu, Jun 19 2016

A230892 Terms of A230891 written in base 10: the binary expansions of a(n) and a(n+1) taken together can be rearranged to form a palindrome.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 11 2013

Keywords

Comments

See A230891 for precise definition.
Just as for A228407, we can ask: does every number appear? The answer is yes - see the Comments in A228407.
The difference d(n)=a(n)-n increases from d(3*2^(k-2)+2) = 1-2^(k-2) to d(3*2^(k-1)+1) = 1-2^(k-1), going through 0 at n=2^k+1 and n=2^k+2, cf. examples. - M. F. Hasler, Nov 12 2013
From Robert G. Wilson v, Nov 15 2013: (Start)
Beginning with k=3, each "grouping" of ever increasing terms, begins at 2^k + 3 and runs up to 2^(k+2) and includes 3*2^(k-1) terms.
Indices of powers of 2 occur at: 2, 3, 4, 6, 13, 25, 49, 97, 193, 385, 769, 1537, ..., which, except for 2, 3 & 6, is A181565: 3*2^n + 1.
When the index equals the term: 0, 4, 9, 10, 17, 18, 33, 34, 65, 66, 129, 130, 257, 258, 513, 514, 1025, 1026, 2049, 2050, ..., .
Parity of a(n) beginning at n=0: 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, ..., . (End)

Examples

			From _M. F. Hasler_, Nov 12 2013: (Start)
Let d(n)=a(n)-n, i.e., a(n)=n+d(n). Then we have, after initial values d(0..8)=(0, 2, -1, -1, 0, 2, 2, -2, -2), the
following pattern: d(9) = d(10) = 0, ..., d(13) = 3,
d(14) = -3, ..., d(17) = d(18) = 0, ..., d(25) = 7;
d(26) = -7, ..., d(33) = d(34) = 0, ..., d(49) = 15,
d(50) = -15, ..., d(65) = d(66) = 0, ..., d(97) = 31,
d(98) = -31, ..., d(129) = d(130) = 0, ..., d(193) = 63,
d(194) = -63,..., d(257) = d(258) = 0, ... (End)
		

Crossrefs

Programs

  • PARI
    {u=0; a=0; La=1; ha=0/*hack*/; for(n=1, 99, u+=1<=2^L,L++); bittest(ha+h=hammingweight(k),0)&&!bittest(La+L,0)&&next; !a&&k<3&&next; a=k; ha=h; La=L; break))} \\ M. F. Hasler, Nov 11 2013
    
  • Python
    from collections import Counter
    A230892_list, l, s, b = [0, 3], Counter('11'), 1, {3}
    for _ in range(30001):
        i = s
        while True:
            if i not in b:
                li, o = Counter(bin(i)[2:]), 0
                for d in (l+li).values():
                    if d % 2:
                        if o > 0:
                            break
                        o += 1
                else:
                    A230892_list.append(i)
                    l = li
                    b.add(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
            i += 1 # Chai Wah Wu, Jun 19 2016

A231920 Working in base 3: a(0)=0, thereafter a(n+1) is the smallest number not already in the sequence such that the bits of a(n) and a(n+1) together can be rearranged to form a palindrome.

Original entry on oeis.org

0, 11, 1, 10, 100, 12, 2, 20, 101, 22, 110, 202, 220, 1000, 102, 21, 111, 122, 212, 221, 1001, 112, 121, 200, 211, 222, 1002, 120, 201, 210, 1011, 1022, 1101, 1110, 1202, 1220, 2012, 2021, 2102, 2120, 2201, 2210, 10000, 1010, 1100, 1111, 1122, 1212, 1221, 2002, 2020
Offset: 0

Views

Author

Keywords

Comments

This is a permutation of the nonnegative integers in base 3 - see the Comments in A228407 for the proof.

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits[ a[n - 1], 3], t = a@# & /@ Range[n - 1]}, Label[ start]; While[ MemberQ[t, k], k++];  While[ Select[ Permutations[ Join[ idm, IntegerDigits[k, 3]]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[ start]]; k]; s = Array[a, 60, 0]; FromDigits@# & /@ IntegerDigits[s, 3]

A231933 Terms of A231932 written in base 10: the binary expansions of a(n) and a(n+1) taken together can be rearranged to form a palindrome.

Original entry on oeis.org

0, 10, 1, 9, 81, 11, 2, 18, 82, 20, 3, 12, 28, 84, 27, 90, 30, 4, 13, 37, 85, 36, 94, 22, 38, 92, 19, 83, 99, 163, 171, 729, 86, 14, 5, 23, 47, 95, 32, 48, 93, 21, 29, 100, 24, 6, 15, 55, 87, 54, 96, 33, 57, 109, 31, 39, 112, 120, 256, 280, 336, 352, 732, 91, 16, 7, 25
Offset: 0

Views

Author

Keywords

Comments

See A231931 for precise definition.
This is a permutation of the nonnegative integers - see the Comments in A228407 for the proof.

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits[ a[n - 1], 9], t = a@# & /@ Range[n - 1]}, Label[ start]; While[ MemberQ[t, k], k++];  While[ Select[ Permutations[ Join[ idm, IntegerDigits[k, 9]]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[ start]]; k]; s = Array[a, 60, 0]

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

Original entry on oeis.org

0, 10, 24, 3, 6, 1, 8, 14, 4, 9, 16, 12, 15, 21, 25, 2, 5, 22, 45, 18, 28, 81, 34, 20, 29, 7, 48, 13, 27, 19, 26, 11, 52, 30, 42, 39, 61, 33, 46, 17, 23, 40, 32, 49, 60, 57, 64, 35, 92, 43, 36, 31, 63, 54, 67, 41, 38, 44, 62, 47, 56, 70, 65, 74, 124, 69, 37
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: A231880(2540) = 2536; A231881(2539) = 2541; A231880(2541,2542,..) = A231881(2540,2541,..) = 2544,2551; ... Hans Havermann, Nov 17 2013

Crossrefs

A variant of A228407. Cf. A231881.

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits@ a[n - 1], t = a@# & /@ Range[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
More terms added (from b-file) by Jon E. Schoenfield, Dec 22 2013
Showing 1-10 of 31 results. Next