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.

Previous Showing 21-26 of 26 results.

A279093 Numbers that are nontrivially palindromic in three or more consecutive integer bases.

Original entry on oeis.org

178, 300, 373, 676, 1111, 1702, 2473, 3448, 4651, 6106, 7837, 9868, 12223, 14926, 18001, 21472, 25363, 29698, 34501, 39796, 45607, 51958, 58873, 66376, 74491, 83242, 92653, 102748, 113551, 125086, 137377, 150448, 164323, 179026, 194581, 211012, 228343, 246598
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 31 2017

Keywords

Comments

For any integer b > 1, the base-b expansion of any number k < b will be a one-digit number, and will thus be trivially palindromic.
For each j >= 5 and odd, k = (j^3 + 6*j^2 + 14*j + 11)/2 is a term in the sequence, and represents a 3-digit palindrome in each of three consecutive integer bases:
.
base 1st digit 2nd digit 3rd digit
---- --------- --------- ---------
j+1 (j+3)/2 (j+5)/2 (j+3)/2
j+2 (j+1)/2 (j+3)/2 (j+1)/2
j+3 (j-1)/2 (j+7)/2 (j-1)/2
.
(see 178 and 373 in the Example section). Nearly all of the first 95 terms of this sequence are terms of this form.
For each j >= 44 and divisible by 4, k = (3*j^5 + 30*j^4 + 125*j^3 + 270*j^2 + 307*j + 148)/4 is a term in the sequence, and represents a 5-digit palindrome in each of three consecutive integer bases:
.
base 1st digit 2nd digit 3rd digit 4th digit 5th digit
---- --------- --------- --------- --------- ---------
j+1 3*j/4 + 4 j/2 + 9 j/4 + 11 j/2 + 9 3*j/4 + 4
j+2 3*j/4 + 1 j/2 + 2 j/4 + 0 j/2 + 2 3*j/4 + 1
j+3 3*j/4 - 2 j/2 + 10 j/4 - 11 j/2 + 10 3*j/4 - 2
.
[Reformatted by Jon E. Schoenfield, Apr 01 2018]
From Matej Veselovac, Mar 31 2018: (Start)
Similarly to the one 3-digit and one 5-digit families given above, at least seven more infinite families exist, for 7-digit consecutive palindromes. Given a nonnegative integer n, we have the following representations palindromic in exactly three consecutive integer number bases j+1, j+2, j+3 :
1. For each j = 36+12n, k = (816 + 2474*j + 3114*j^2 + 2117*j^3 + 852*j^4 + 209*j^5 + 30*j^6 + 2*j^7)/12 is a term of the sequence.
2. For each j = 55+6n, k = (245 + 748 j + 980 j^2 + 718 j^3 + 320 j^4 + 88 j^5 + 14 j^6 + j^7)/6 is a term of the sequence.
3. For each j = 73+2n, k = (247 + 748 j + 980 j^2 + 718 j^3 + 320 j^4 + 88 j^5 + 14 j^6 + j^7)/2 is a term of the sequence.
4. For each j = 116+12n, k = (2440 + 7366 j + 9694 j^2 + 7171 j^3 + 3232 j^4 + 895 j^5 + 142 j^6 + 10 j^7)/12 is a term of the sequence.
5. For each j = 172+6n, k = (812 + 2446 j + 3290 j^2 + 2527 j^3 + 1190 j^4 + 343 j^5 + 56 j^6 + 4 j^7)/6 is a term of the sequence.
6. For each j = 288+12n, k = (1176 + 3566 j + 4374 j^2 + 2807 j^3 + 1032 j^4 + 227 j^5 + 30 j^6 + 2 j^7)/12 is a term of the sequence.
7. For each j = 277+6n, k = (1237 + 3740 j + 4900 j^2 + 3590 j^3 + 1600 j^4 + 440 j^5 + 70 j^6 + 5 j^7)/6 is a term of the sequence.
The smallest terms given by these families are of magnitudes ~ 10^10.3, 10^11.5, 10^12.8, 10^14.4, 10^15.5, 10^16.4 and 10^17. The smallest term of the next family, if it exists, is at least of magnitude ~ 10^18.
Almost all known terms of the sequence so far belong in one of the above defined families, either being 3-, 5-, or 7- digit palindromes in exactly 3 consecutive integer number bases.
There are 13 known terms that do not belong to any families: 300, 3360633, 19987816, 43443858, 532083314, 1778140759, 2721194733, 11325719295, 47622367425, 97638433343, 224678540182, 265282702996, 561091062285 (all but 300 so far are 7-digit cases).
Infinite families for consecutive palindromes longer than 7 digits, as well as any examples for those cases, have not yet been observed.
Smallest example for 9-digit consecutive palindromes does not exist within first 100 integer number bases, thus is at least > 10^16.
Similarly, no terms palindromic in 4 or more consecutive integer number bases have been found, so far.
[Extended by Matej Veselovac, Feb 05 2019] (End)

Examples

			178 is in the sequence because the bases in which 178 is nontrivially palindromic include 6, 7, and 8: 178 = 454_6 = 343_7 = 262_8.
373 is in the sequence because the bases in which 373 is nontrivially palindromic include 8, 9, and 10: 373 = 565_8 = 454_9 = 373_10.
265282702996 is in the sequence because the bases in which it is nontrivially palindromic include 43, 44, and 45.
130 is nontrivially palindromic in 7 integer bases (11211_3 = 2002_4 = 202_8 = aa_12 = 55_25 = 22_64 = 11_129), but these bases do not include three consecutive integers, so 130 is not in the sequence.
		

Crossrefs

Cf. A002113 (palindromes in base 10), A048268 (smallest palindrome greater than n in bases n and n+1).
Numbers that are palindromic in bases k and k+1: A060792 (k=2), A097928 (k=3), A097929 (k=4), A097930 (k=5), A097931 (k=6), A099145 (k=7), A099146 (k=8), A029965 (k=9), A029966 (k=11).
Cf. A279092 (numbers that are nontrivially palindromic in two or more consecutive integer bases).

A056749 Smallest palindrome greater than n in bases 2 and n.

Original entry on oeis.org

3, 6643, 5, 31, 7, 85, 9, 127, 33, 255, 65, 313, 15, 693, 17, 341, 325, 381, 21, 1241, 771, 645, 325, 951, 27, 5461, 1317, 1161, 31, 1241, 33, 1453, 455, 5709, 3999, 2925, 195, 4097, 1025, 7671, 129, 2409, 45, 4097, 4095, 3855, 1421, 5049, 51, 8673, 3069
Offset: 2

Views

Author

Robert G. Wilson v, Aug 15 2000

Keywords

Crossrefs

Cf. A048268 (bases n and n+1).

Programs

  • Mathematica
    Do[ k = n +1; While[ RealDigits[ k, n ][ [ 1 ] ] != Reverse[ RealDigits[ k, n ][ [ 1 ] ] ] || RealDigits[ k, 2 ][ [ 1 ] ] != Reverse[ RealDigits[ k, 2 ][ [ 1 ] ] ], k++ ]; Print[ k ], {n, 2, 60} ]
  • PARI
    isok2(j, n) = my(d=digits(j,n), b=binary(j)); (Vecrev(d)==d) && (Vecrev(b)==b);
    a(n) = {my(j = n); while(! isok2(j, n), j++); j;} \\ Michel Marcus, Nov 16 2017

A048269 First palindrome greater than n+2 in bases n+2 and n.

Original entry on oeis.org

5, 26, 21, 24, 154, 40, 121, 60, 181, 84, 253, 112, 337, 144, 433, 180, 541, 220, 661, 264, 793, 312, 937, 364, 1093, 420, 1261, 480, 1441, 544, 1633, 612, 1837, 684, 2053, 760, 2281, 840, 2521, 924, 2773, 1012, 3037, 1104, 3313, 1200, 3601, 1300, 3901
Offset: 2

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

a(2), a(3), a(4) and a(6) must be found explicitly.

Examples

			a(15)= (15+3)/2*15+(15+3)/2=144, which is (99) in base 15 and (88) in base 17.
		

Crossrefs

Cf. A048268.

Programs

  • Mathematica
    Do[ k = n + 3; While[ RealDigits[ k, n + 2 ][[ 1 ] ] != Reverse[ RealDigits[ k, n + 2 ][[ 1 ] ] ] || RealDigits[ k, n ][[ 1 ] ] != Reverse[ RealDigits[ k, n ][[ 1 ] ] ], k++ ]; Print[ k ], {n, 2, 50} ]
    LinearRecurrence[{0,3,0,-3,0,1},{5,26,21,24,154,40,121,60,181,84,253},50] (* Harvey P. Dale, May 12 2025 *)
  • PARI
    Vec(x^2*(5 + 26*x + 6*x^2 - 54*x^3 + 106*x^4 + 46*x^5 - 283*x^6 - 14*x^7 + 259*x^8 - 81*x^10) / ((1 - x)^3*(1 + x)^3) + O(x^50)) \\ Colin Barker, Jun 30 2019

Formula

n even and n >= 8: a(n) = n^2+(n/2+3)*n+1 (which is (1 n/2+3 1) in base n and (1 n/2-2 1) in base n+2).
n odd and n >= 5: a(n) = (n+1)*(n+3)/2 (which is ((n+3)/2 (n+3)/2) in base n and ((n+1)/2 (n+1)/2) in base n+2).
From Colin Barker, Jun 30 2019: (Start)
G.f.: x^2*(5 + 26*x + 6*x^2 - 54*x^3 + 106*x^4 + 46*x^5 - 283*x^6 - 14*x^7 + 259*x^8 - 81*x^10) / ((1 - x)^3*(1 + x)^3).
a(n) = (5 + (-1)^(1 + n) + 2*(5 + (-1)^n)*n + 2*(2 + (-1)^n)*n^2) / 4 for n>6.
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>10.
(End)

Extensions

More terms from Robert G. Wilson v, Aug 15 2000

A293925 Triangle read by rows T(n, k) is the least integer that is a palindrome in base n and k, with more than 1 digit in both bases, n >= 3 and 2 <= k < n.

Original entry on oeis.org

6643, 5, 10, 31, 26, 46, 7, 28, 21, 67, 85, 8, 85, 24, 92, 9, 121, 63, 18, 154, 121, 127, 10, 10, 109, 80, 40, 154, 33, 121, 55, 88, 55, 121, 121, 191, 255, 244, 255, 12, 166, 24, 36, 60, 232, 65, 13, 65, 26, 104, 78, 65, 91, 181, 277, 313, 28, 42, 98, 14, 235, 154, 70, 222, 84, 326
Offset: 3

Views

Author

Michel Marcus, Nov 16 2017

Keywords

Examples

			Triangle begins:
  6643,
     5,  10,
    31,  26, 46,
     7,  28, 21, 67,
    85,   8, 85, 24,  92,
     9, 121, 63, 18, 154, 121,
  ...
		

Crossrefs

Cf. A048268 (right diagonal), A056749 (1st column).

Programs

  • Mathematica
    palQ[n_Integer, base_Integer] := Block[{}, Reverse[idn = IntegerDigits[n, base]] == idn]; Table[ t[n, k], {n, 3, 13}, {k, 2, n - 1}] // Flatten (* Robert G. Wilson v, Nov 17 2017 *)
  • PARI
    isok(j, n, k) = my(dn=digits(j,n), dk=digits(j,k)); (Vecrev(dn)==dn) && (Vecrev(dk)==dk);
    T(n,k) = {j = max(n,k); while(! isok(j, n, k), j++); j;}
    tabl(nn) = for (n=3, nn, for (k=2, n-1, print1(T(n,k), ", ")); print);

A308918 a(n) is the number of palindromic numbers with 7 digits in base n which are also palindromic in base n+1.

Original entry on oeis.org

0, 0, 1, 2, 7, 8, 13, 18, 27, 35, 50, 61, 75, 79, 96, 113, 120, 150, 173, 180, 204, 227, 245, 274, 295, 318, 346, 363, 398, 438, 448, 484, 524, 537, 584, 625, 648, 707, 749, 771, 830, 882, 914, 983, 1041, 1073, 1143, 1207, 1238, 1307, 1372, 1405, 1480, 1544, 1573, 1645
Offset: 2

Views

Author

A.H.M. Smeets, Jun 30 2019

Keywords

Comments

If an integer m is palindromic in both bases n and n+1, then m has an odd number of digits in base n (see also A048268).
If m has 1, 3 or 5 digits in base n, the number of integers that are palindromic in bases n and n+1 is of order O(n) (see also A048268).
If m has at least 7 digits in base n, it seems that a(n) is of order O(n^2*log(n)).

Crossrefs

Cf. A048268.

Programs

  • PARI
    nextpal(n, b) = {my(m=n+1, p = 0); while (m > 0, m = m\b; p++;); if (n+1 == b^p, p++); n = n\(b^(p\2))+1; m = n; n = n\(b^(p%2)); while (n > 0, m = m*b + n%b; n = n\b;); m;} \\ after Python
    ispal(n, b) = my(d=digits(n, b)); Vecrev(d) == d;
    a(n) = {my(d=7, p = n^(d-1)-1, nb = 0); while (p < n^d, p = nextpal(p, n+1); if (ispal(p, n), nb++);); nb;} \\ Michel Marcus, Jul 04 2019
  • Python
    def nextpal(n,base): # m is the first palindrome successor of n in base base
        m, pl = n+1, 0
        while m > 0:
            m, pl = m//base, pl+1
        if n+1 == base**pl:
            pl = pl+1
        n = n//(base**(pl//2))+1
        m, n = n, n//(base**(pl%2))
        while n > 0:
            m, n = m*base+n%base, n//base
        return m
    def ispal(n,b):
        if n%b == 0:
            return 0
        else:
            nn, m = n, 0
            while n > 0:
                n, m = n//b, m*b+n%b
            return m == nn
    n, d = 1, 7
    while n < 20000:
        n = n+1
        p = n**(d-1)-1
        a = 0
        while p < n**d:
            p = nextpal(p,n+1)
            if ispal(p,n):
                a = a+1
        print(n,a)
    

A331192 Numbers whose Zeckendorf representation (A014417) and dual Zeckendorf representation (A104326) are both palindromic.

Original entry on oeis.org

0, 1, 4, 6, 12, 22, 33, 64, 88, 174, 232, 462, 609, 1216, 1596, 3190, 4180, 8358, 10945, 21888, 28656, 57310, 75024, 150046, 196417, 392832, 514228, 1028454, 1346268, 2692534, 3524577, 7049152, 9227464, 18454926, 24157816, 48315630, 63245985, 126491968, 165580140
Offset: 1

Views

Author

Amiram Eldar, Jan 11 2020

Keywords

Comments

Apparently union of numbers of the form F(2*k - 1) - 1 (k > 0) and numbers of the form 2 * F(2*k - 1) - 4 (k > 1), where F(m) is the m-th Fibonacci number.
The numbers of the form F(2*k - 1) - 1 have the same Zeckendorf and dual Zeckendorf representations. For k > 1 the representation is 1010...01, k-1 1's interleaved with k-2 0's.

Examples

			6 is a term since its Zeckendorf representation, 1001, and its dual Zeckendorf representation, 111, are both palindromic.
		

Crossrefs

Programs

  • Mathematica
    mirror[dig_, s_] := Join[dig, s, Reverse[dig]];
    select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &];
    fib[dig_] := Plus @@ (dig*Fibonacci[Range[2, Length[dig] + 1]]);
    ndig = 12; pals1 = Rest[IntegerDigits /@ FromDigits /@ Select[Tuples[{0, 1}, ndig], SequenceCount[#, {1, 1}] == 0 &]];
    zeckPals = Union @ Join[{0, 1}, fib /@ Join[mirror[#, {}] & /@ (select[pals1, 1]), mirror[#, {1}] & /@ (select[pals1, 1]), mirror[#, {0}] & /@ pals1]];
    pals2 = Join[{{}}, Rest[Select[IntegerDigits[Range[0, 2^ndig - 1], 2], SequenceCount[#, {0, 0}] == 0 &]]];
    dualZeckPals = Union@Join[{0}, fib /@ Join[mirror[#, {}] & /@ (select[pals2, 0]), mirror[#, {0}] & /@ (select[pals2, 0]), mirror[#, {1}] & /@ pals2]];
    Intersection[zeckPals, dualZeckPals]
Previous Showing 21-26 of 26 results.