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 11-15 of 15 results.

A259383 Palindromic numbers in bases 5 and 8 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 18, 36, 186, 438, 2268, 2709, 11898, 18076, 151596, 228222, 563786, 5359842, 32285433, 257161401, 551366532, 621319212, 716064597, 2459962002, 5018349804, 5067084204, 7300948726, 42360367356, 139853034114, 176616961826, 469606524278, 669367713609, 1274936571666, 1284108810066, 5809320306961, 8866678870082, 11073162740322, 14952142559323, 325005646077513
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			186 is in the sequence because 186_10 = 272_8 = 1221_5.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 8]; If[palQ[pp, 5], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=5; b2=8; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 10000000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A029952 and A029803.

A259387 Palindromic numbers in bases 4 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 255, 273, 373, 546, 2550, 2730, 2910, 16319, 23205, 54215, 1181729, 1898445, 2576758, 3027758, 3080174, 4210945, 9971750, 163490790, 2299011170, 6852736153, 6899910553, 160142137430, 174913133450, 204283593150, 902465909895, 1014966912315, 2292918574418, 9295288254930, 11356994802010, 11372760382810, 38244097345762
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			273 is in the sequence because 273_10 = 333_9 = 10101_4.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 9]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=4; b2=9; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 10000000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A014192 and A029955.

A259388 Palindromic numbers in bases 5 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 109, 246, 282, 564, 701, 22386, 32152, 41667, 47653, 48553, 1142597, 1313858, 1412768, 1677684, 12607012902, 19671459008, 20134447808, 24208576998, 24863844904, 26358878059
Offset: 1

Views

Author

Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			246 is in the sequence because 246_10 = 303_9 = 1441_5.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 9]; If[palQ[pp, 5], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=5; b2=9; lst={};Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 10000000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A029952 and A029955.

A259389 Palindromic numbers in bases 6 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 80, 154, 191, 209, 910, 3740, 5740, 8281, 16562, 16814, 2295481, 2300665, 2350165, 2439445, 2488945, 2494129, 2515513, 7971580, 48307924, 61281793, 69432517, 123427622, 124091822, 124443290, 55854298990, 184314116750, 185794441250, 187195815770, 327925630018, 7264479038060, 27832011695551
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 17 2015

Keywords

Examples

			209 is in the sequence because 209_10 = 252_9 = 545_6.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 9]; If[palQ[pp, 6], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=6; b2=9; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 1000000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A029953 and A029955.

A319584 Numbers that are palindromic in bases 2, 4, and 8.

Original entry on oeis.org

0, 1, 3, 5, 63, 65, 195, 325, 341, 4095, 4097, 4161, 12291, 12483, 20485, 20805, 21525, 21845, 258111, 262143, 262145, 266305, 786435, 798915, 1310725, 1311749, 1331525, 1332549, 1376277, 1377301, 1397077, 1398101, 16515135, 16777215, 16777217, 16781313
Offset: 1

Views

Author

Jeremias M. Gomes, Sep 23 2018

Keywords

Comments

Intersection of A006995, A014192, and A029803.
From A.H.M. Smeets, Jun 08 2019: (Start)
Intersection of A006995 and A259382.
Intersection of A014192 and A259380.
Intersection of A029803 and A097856.
All repunit numbers in base 2 with 6*k digits are included in this sequence, i.e., all terms A000225(6*k) for k >= 0.
All repunit numbers in base 4 with 2+3*k digits are included in this sequence, i.e., all terms A002450(2+3*k) for k >= 0.
All terms A000051(6*k) for k > 0 are included in this sequence.
All terms A052539(3*k) for k > 0 are included in this sequence.
In general, for sequences with palindromic numbers in the set of bases {b, b^2, ..., b^k}, gaps of size 2 occur at the term pairs (b^(k!) - 1, b^(k!) + 1). See also A319598 for b = 2 and k = 4.
The terms occur in bursts with large gaps in between as shown in the scatterplots of log_b(a(n)-a(n-1)) versus log_b(n) and log_b(1-a(n-1)/a(n)) versus log_b(n). Terms of this sequence are those with b = 2 and k = 3. For comparison, terms with b = 3 and k = 3 are also shown in these plots.
(End)

Examples

			89478485 = 101010101010101010101010101_2 = 11111111111111_4 = 525252525_8.
		

Crossrefs

Cf. A006995 (base 2), A014192 (base 4), A029803 (base 8), A097956 (bases 2 and 4), A259380 (bases 2 and 8), A259382 (bases 4 and 8), A319598 (bases 2, 4, 8 and 16).

Programs

  • Magma
    [n: n in [0..2*10^7] | Intseq(n, 2) eq Reverse(Intseq(n, 2)) and Intseq(n, 4) eq Reverse(Intseq(n, 4)) and Intseq(n, 8) eq Reverse(Intseq(n, 8))]; // Vincenzo Librandi, Sep 24 2018
    
  • Mathematica
    palQ[n_, b_] := PalindromeQ[IntegerDigits[n, b]];
    Reap[Do[If[palQ[n, 2] && palQ[n, 4] && palQ[n, 8], Print[n]; Sow[n]], {n, 0, 10^6}]][[2, 1]] (* Jean-François Alcover, Sep 25 2018 *)
    Select[Range[0,168*10^5],AllTrue[Table[IntegerDigits[#,d],{d,{2,4,8}}],PalindromeQ]&] (* Harvey P. Dale, Jan 27 2024 *)
  • PARI
    ispal(n, b) = my(d=digits(n, b)); Vecrev(d) == d;
    isok(n) = ispal(n, 2) && ispal(n, 4) && ispal(n, 8); \\ Michel Marcus, Jun 11 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 rev(n, b):
        m = 0
        while n > 0:
            n, m = n//b, m*b+n%b
        return m
    n, a = 1, 0
    while n <= 100:
        if a == rev(a, 4) == rev(a, 2):
            print(a)
            n += 1
        a = nextpal(a, 8) # A.H.M. Smeets, Jun 08 2019
    
  • Sage
    [n for n in (0..1000) if Word(n.digits(2)).is_palindrome() and Word(n.digits(4)).is_palindrome() and Word(n.digits(8)).is_palindrome()]
    
Previous Showing 11-15 of 15 results.