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.

A336733 Positive integers which can be written in two bases smaller than 10 as mutually-reversed strings of digit(s).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 17, 22, 31, 51, 87, 91, 102, 121, 212, 220, 248, 2601, 5258, 7491, 8283, 9831, 10516, 13541, 15774, 16566, 71500, 644765, 731445, 811518, 3552340, 314767045, 1427310725, 1848187230, 1916060910, 47124212513, 455075911977
Offset: 1

Views

Author

Graham Holmes, Aug 02 2020

Keywords

Comments

Base conversion yields a string of digits which by convention has any leading zeros suppressed. However, a conversion which yields a low zero (e.g., 96_10 = 240_6) will see that zero preserved when the string of digits is reversed (e.g., into "042"), so it can never match any base-converted strings before reversal. It's therefore not possible to have a solution involving a base which exhibits a low zero for any input x. A consequence of this is that any solution will require both base-converted strings to be of the same length; considering that any solution for a sufficiently-high x will involve only bases 8 and 9 (these having the slowest rate of change with respect to x), we can deduce that the upper limit for valid solutions occurs at the point beyond which length(x base 8) - length(x base 9) is permanently greater than unity, and this can be shown to occur at 8^18, or approximately 1.80*10^16.
40 terms are known up to 4.7*10^13.
It's worthy of note that 22 has two distinct nontrivial solutions as 22_10 = 211_3 = 112_4, and 22_10 = 42_5 = 24_9.
As 1 through 6 have one digit in at least two distinct bases each less than 10 they are trivially included in the sequence. - David A. Corneth, Aug 03 2020
No more terms beyond a(40). - Bert Dobbelaere, Sep 26 2020

Examples

			7 is a term since 7 = 21 (base 3) = 12 (base 5).
9 is a term since 9 = 21 (base 4) = 12 (base 7).
...
1916060910 is a term since it is = 65324151261 (base 7) = 16215142356 (base 8).
		

Crossrefs

Cf. A336768 (for bases >= 4).

Programs

  • JavaScript
    n=[]; rev=[]; incl=[]; for (i=1; i<=1000; i++) { for (j=2; j<=9; j++) { n[j]=i.toString(j); rev[j]=n[j].split("").reverse().join(""); } for (j=2; j<=8; j++) for (k=j+1; k<=9; k++) if (n[j]==rev[k]) if (incl.indexOf(i)==-1) incl.push(i); } document.write(incl);
    
  • Mathematica
    seqQ[n_] := Module[{dig = IntegerDigits[n, Range[2, 9]]}, dig = Select[dig, ! PalindromeQ[#] &]; n < 7 || Intersection[dig, Reverse /@ dig] != {}]; Select[Range[10^6], seqQ] (* Amiram Eldar, Aug 04 2020 *)
  • PARI
    isok(m) = {for (b=2, 8, my(db = digits(m, b)); for(c=b+1, 9, my(dc = digits(m, c)); if (Vecrev(dc) == db, return (1));););} \\ Michel Marcus, Aug 03 2020
    
  • PARI
    is(n) = {my(v = vecsort(vector(8, i, d = digits(n, i+1); if(d[1] < d[#d], Vecrev(d), d)))); for(i = 1, 7, if(v[i] == v[i+1], return(1))); 0} \\ David A. Corneth, Aug 03 2020

Extensions

a(40) from David A. Corneth, Aug 07 2020

A336827 a(n) is the largest integer that can be written in two bases smaller than n as mutually-reversed strings of digit(s), for n>=4.

Original entry on oeis.org

1, 22, 22, 9831, 314767045, 1916060910, 455075911977
Offset: 4

Views

Author

Michel Marcus, Aug 05 2020

Keywords

Examples

			a(5) is 22 because 22 = 211 (base 3) = 112 (base 4) is the largest such integer with both bases < 5 (here 3 and 4).
a(6) is also 22 because there are no larger such integers with both bases < 6.
a(7) is 9831 because 9831 = 303311 (base 5) and 113303 (base 6) is the largest such integer with both bases < 7 (here 5 and 6).
		

Crossrefs

Extensions

a(9)-a(10) from Bert Dobbelaere, Sep 20 2020
Showing 1-2 of 2 results.