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

A165785 Base 10 representation of A240602.

Original entry on oeis.org

0, 1, 3, 5, 7, 15, 27, 31, 45, 63, 85, 93, 119, 127, 255, 495, 511, 891, 1023, 1755, 1787, 2015, 2047, 2925, 4095, 5805, 5869, 8127, 8191, 10965, 11997, 15351, 16383, 21845, 21973, 23901, 24029, 30583, 30711, 32639, 32767, 65535, 130815, 131071, 253935
Offset: 1

Views

Author

Leroy Quet, Sep 26 2009

Keywords

Comments

Each term is a palindrome when written in base 2.
This entry is the result of merging two sequences. The old definition (which did not have the initial zero) was: "a(1)=1. For n >= 2, each a(n) = the decimal equivalent of either a(k)Ua(k) or a(k)U0Ua(k) or a(k)U1Ua(k), where U denotes concatenation of the binary representations of the arguments, and where k is some positive integer < n. The numbers are arranged in numerical order."

Crossrefs

Programs

  • Mathematica
    Select[Range[2^14], And[PalindromeQ@ Take[#, Floor[Length[#]/2]], PalindromeQ[#]] &@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Nov 08 2017 *)

Extensions

Extended by Ray Chandler, Mar 12 2010
New definition from Lior Manor, May 27 2014
Edited by N. J. A. Sloane, May 30 2014

A243036 Number of entries of length n in A240602.

Original entry on oeis.org

2, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 8, 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4
Offset: 1

Views

Author

Lior Manor, May 29 2014

Keywords

Comments

For n>0, a(2^n) = 1.
For any base b, a(1) = b, a(2) = b-1, a(3) = b*(b-1), for m>1, a(2m) = a(m), a(2m+1) = b*a(m).
For any base b, a(n) = (b-1)*b^(A000120(n)-1).
Essentially the same as A048896. - R. J. Mathar, Jun 27 2014

Crossrefs

Formula

a(1) = 2, a(2) = 1, a(3) = 2, For m>1, a(2m) = a(m), a(2m+1) = 2*a(m).
a(n) = 2^(A000120(n)-1).

A240601 Recursive palindromes in base 10: palindromes n where each half of the digits of n is also a recursive palindrome.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 606, 616, 626, 636, 646, 656, 666, 676, 686, 696, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 808, 818, 828, 838, 848, 858, 868, 878, 888, 898, 909, 919, 929, 939, 949, 959, 969, 979, 989, 999, 1111
Offset: 1

Views

Author

Lior Manor, Apr 09 2014

Keywords

Comments

A number n with m digits in base 10 is a member if n is a palindrome, and the first floor(m/2) digits of n is already a previous term of a(n). All repdigit numbers are terms of a(n). Fast generation of new terms with 2m digits can be done by concatenating the previous terms with m digits twice. Fast generation of new terms with 2m+1 digits can be done by concatenating the previous terms with m digits twice with any single digit in the middle. The smallest palindrome which is not a member of a(n) is 1001.

Examples

			11011 is in the sequence since it is a palindrome of 5 digits, and the first floor(5/2) digits of it, 11, is also a term. 1001 and 10001 are not in the sequence since 10 is not in the sequence.
		

Crossrefs

Cf. A227858 (first difference is a(110) = 1111, but A227858(109) = 1001). - Georg Fischer, Oct 23 2018

Programs

  • Python
    from itertools import product
    def pals(d, base=10): # all d-digit palindromes as strings
      digits = "".join(str(i) for i in range(base))
      for p in product(digits, repeat=d//2):
        if d//2 > 0 and p[0] == "0": continue
        left = "".join(p); right = left[::-1]
        for mid in [[""], digits][d%2]: yield left + mid + right
    def auptod(dd):
      for d in range(1, dd+1):
        for p in pals(d//2):
          if d//2 == 0: p = ""
          elif p[0] == "0": continue
          for mid in [[""], "0123456789"][d%2]: yield int(p+mid+p[::-1])
    print([rp for rp in auptod(6)]) # Michael S. Branicky, May 22 2021
Showing 1-3 of 3 results.