A259378
Palindromic numbers in bases 4 and 7 written in base 10.
Original entry on oeis.org
0, 1, 2, 3, 5, 85, 150, 235, 257, 8802, 9958, 13655, 14811, 189806, 428585, 786435, 9262450, 31946605, 34179458, 387973685, 424623193, 430421657, 640680742, 742494286, 1692399385, 22182595205, 30592589645, 1103782149121, 1134972961921, 1871644872505, 2047644601565, 3205015384750, 3304611554563, 3628335729863, 4467627704385
Offset: 1
85 is in the sequence because 85_10 = 151_7 = 1111_4.
Cf.
A048268,
A060792,
A097856,
A097928,
A182232,
A259374,
A097929,
A182233,
A259375,
A259376,
A097930,
A182234,
A259377,
A259378,
A249156,
A097931,
A259380,
A259381,
A259382,
A259383,
A259384,
A099145,
A259385,
A259386,
A259387,
A259388,
A259389,
A259390,
A099146,
A007632,
A007633,
A029961,
A029962,
A029963,
A029964,
A029804,
A029965,
A029966,
A029967,
A029968,
A029969,
A029970,
A029731,
A097855,
A250408,
A250409,
A250410,
A250411,
A099165,
A250412.
-
(* 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, 7]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
b1=4; b2=7; 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 *)
A259382
Palindromic numbers in bases 4 and 8 written in base 10.
Original entry on oeis.org
0, 1, 2, 3, 5, 63, 65, 105, 130, 170, 195, 235, 325, 341, 357, 373, 4095, 4097, 4161, 4225, 4289, 6697, 6761, 6825, 6889, 8194, 8258, 8322, 8386, 10794, 10858, 10922, 10986, 12291, 12355, 12419, 12483, 14891, 14955, 15019, 15083, 20485, 20805, 21525, 21845
Offset: 1
235 is in the sequence because 235_10 = 353_8 = 3223_4.
Cf.
A048268,
A060792,
A097856,
A097928,
A182232,
A259374,
A097929,
A182233,
A259375,
A259376,
A097930,
A182234,
A259377,
A259378,
A249156,
A097931,
A259380,
A259381,
A259382,
A259383,
A259384,
A099145,
A259385,
A259386,
A259387,
A259388,
A259389,
A259390,
A099146,
A007632,
A007633,
A029961,
A029962,
A029963,
A029964,
A029804,
A029965,
A029966,
A029967,
A029968,
A029969,
A029970,
A029731,
A097855,
A250408,
A250409,
A250410,
A250411,
A099165,
A250412.
-
(* 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, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
b1=4; b2=8; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 30000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)
A029986
Numbers k such that k^2 is palindromic in base 4.
Original entry on oeis.org
0, 1, 5, 17, 21, 65, 71, 83, 257, 273, 281, 317, 1025, 1055, 4097, 4161, 4193, 4401, 5157, 5179, 5221, 16385, 16511, 16865, 17239, 65537, 65793, 65921, 66753, 68695, 69521, 69777, 80739, 82053, 82171, 82309, 82885, 83301, 262145
Offset: 1
Numbers k such that k^2 is palindromic in base b:
A003166 (b=2),
A029984 (b=3), this sequence (b=4),
A029988 (b=5),
A029990 (b=6),
A029992 (b=7),
A029805 (b=8),
A029994 (b=9),
A002778 (b=10),
A029996 (b=11),
A029737 (b=12),
A029998 (b=13),
A030072 (b=14),
A030073 (b=15),
A029733 (b=16),
A118651 (b=17).
-
Select[Range[0,300000],IntegerDigits[#^2,4]==Reverse[ IntegerDigits[ #^2,4]]&] (* Harvey P. Dale, Dec 01 2015 *)
-
isok(k) = my(d=digits(k^2,4)); d == Vecrev(d); \\ Michel Marcus, Jul 04 2021
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
273 is in the sequence because 273_10 = 333_9 = 10101_4.
Cf.
A048268,
A060792,
A097856,
A097928,
A182232,
A259374,
A097929,
A182233,
A259375,
A259376,
A097930,
A182234,
A259377,
A259378,
A249156,
A097931,
A259380,
A259381,
A259382,
A259383,
A259384,
A099145,
A259385,
A259386,
A259387,
A259388,
A259389,
A259390,
A099146,
A007632,
A007633,
A029961,
A029962,
A029963,
A029964,
A029804,
A029965,
A029966,
A029967,
A029968,
-
(* 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 *)
A118595
Palindromes in base 4 (written in base 4).
Original entry on oeis.org
0, 1, 2, 3, 11, 22, 33, 101, 111, 121, 131, 202, 212, 222, 232, 303, 313, 323, 333, 1001, 1111, 1221, 1331, 2002, 2112, 2222, 2332, 3003, 3113, 3223, 3333, 10001, 10101, 10201, 10301, 11011, 11111, 11211, 11311, 12021, 12121, 12221, 12321, 13031
Offset: 1
-
(* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 290], Max@IntegerDigits@# < 4 &] (* Robert G. Wilson v, May 09 2006 *)
-
from gmpy2 import digits
def A118595(n):
if n == 1: return 0
y = (x:=1<<(n.bit_length()-2&-2))<<2
return int((s:=digits(n-x,4))+s[-2::-1] if nChai Wah Wu, Jun 14 2024
A029958
Numbers that are palindromic in base 13.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 170, 183, 196, 209, 222, 235, 248, 261, 274, 287, 300, 313, 326, 340, 353, 366, 379, 392, 405, 418, 431, 444, 457, 470, 483, 496, 510, 523, 536, 549, 562
Offset: 1
- John Cerkan, Table of n, a(n) for n = 1..10000
- Javier Cilleruelo, Florian Luca and Lewis Baxter, Every positive integer is a sum of three palindromes, Mathematics of Computation, Vol. 87, No. 314 (2018), pp. 3023-3055, arXiv preprint, arXiv:1602.06208 [math.NT], 2017.
- Patrick De Geest, Palindromic numbers beyond base 10.
- Phakhinkon Phunphayap and Prapanpong Pongsriiam, Estimates for the Reciprocal Sum of b-adic Palindromes, 2019.
- Index entries for sequences that are an additive basis, order 3.
Palindromes in bases 2 through 12:
A006995,
A014190,
A014192,
A029952,
A029953,
A029954,
A029803,
A029955,
A002113,
A029956,
A029957.
-
f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,13],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
Select[Range[0,600],IntegerDigits[#,13]==Reverse[IntegerDigits[#,13]]&] (* Harvey P. Dale, Nov 16 2022 *)
-
isok(n) = my(d=digits(n, 13)); d == Vecrev(d); \\ Michel Marcus, May 13 2017
-
from sympy import integer_log
from gmpy2 import digits
def A029958(n):
if n == 1: return 0
y = 13*(x:=13**integer_log(n>>1,13)[0])
return int((c:=n-x)*x+int(digits(c,13)[-2::-1]or'0',13) if nChai Wah Wu, Jun 14 2024
A214425
Numbers n palindromic in exactly three bases b, 2 <= b <= 10.
Original entry on oeis.org
9, 10, 21, 40, 55, 63, 65, 80, 85, 100, 130, 154, 164, 178, 191, 195, 203, 235, 242, 255, 257, 273, 282, 292, 300, 325, 328, 341, 400, 455, 585, 656, 819, 910, 2709, 4095, 4097, 4161, 6643, 8200, 12291, 12483, 14762, 20485, 20805, 21525, 21845, 32152, 53235
Offset: 1
10 is palindromic in bases 3, 4, and 9.
273 is in the sequence because 100010001_2 = 101010_3 = 10101_4 = 2043_5 = 1133_6 = 540_7 = 421_8 = 333_9 = 273_10 and three of the bases, namely 2, 4 & 9, yield palindromes. - _Giovanni Resta_ and _Robert G. Wilson v_, Jul 17 2015
-
n = -1; t = {}; While[Length[t] < 100, n++; If[Count[Table[s = IntegerDigits[n, m]; s == Reverse[s], {m, 2, 10}], True] == 3, AppendTo[t, n]]]; t
A029959
Numbers that are palindromic in base 14.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 197, 211, 225, 239, 253, 267, 281, 295, 309, 323, 337, 351, 365, 379, 394, 408, 422, 436, 450, 464, 478, 492, 506, 520, 534, 548, 562, 576, 591
Offset: 1
195 is DD in base 14.
196 is 100 in base 14, so it's not in the sequence.
197 is 101 in base 14.
- John Cerkan, Table of n, a(n) for n = 1..10000
- Javier Cilleruelo, Florian Luca and Lewis Baxter, Every positive integer is a sum of three palindromes, Mathematics of Computation, Vol. 87, No. 314 (2018), pp. 3023-3055, arXiv preprint, arXiv:1602.06208 [math.NT], 2017.
- Patrick De Geest, Palindromic numbers beyond base 10.
- Phakhinkon Phunphayap and Prapanpong Pongsriiam, Estimates for the Reciprocal Sum of b-adic Palindromes, 2019.
- Index entries for sequences that are an additive basis, order 3.
Palindromes in bases 2 through 13:
A006995,
A014190,
A014192,
A029952,
A029953,
A029954,
A029803,
A029955,
A002113,
A029956,
A029957,
A029958.
-
palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[ Range[0, 600], palQ[#, 14] &] (* Harvey P. Dale, Aug 03 2014 *)
-
isok(n) = Pol(d=digits(n, 14)) == Polrev(d); \\ Michel Marcus, Mar 12 2017
-
from sympy import integer_log
from gmpy2 import digits
def A029959(n):
if n == 1: return 0
y = 14*(x:=14**integer_log(n>>1,14)[0])
return int((c:=n-x)*x+int(digits(c,14)[-2::-1]or'0',14) if nChai Wah Wu, Jun 14 2024
A029960
Numbers that are palindromic in base 15.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 226, 241, 256, 271, 286, 301, 316, 331, 346, 361, 376, 391, 406, 421, 436, 452, 467, 482, 497, 512, 527, 542, 557, 572, 587, 602, 617
Offset: 1
- John Cerkan, Table of n, a(n) for n = 1..10000
- Javier Cilleruelo, Florian Luca and Lewis Baxter, Every positive integer is a sum of three palindromes, Mathematics of Computation, Vol. 87, No. 314 (2018), pp. 3023-3055, arXiv preprint, arXiv:1602.06208 [math.NT], 2017.
- Patrick De Geest, Palindromic numbers beyond base 10.
- Phakhinkon Phunphayap and Prapanpong Pongsriiam, Estimates for the Reciprocal Sum of b-adic Palindromes, 2019.
- Index entries for sequences that are an additive basis, order 3.
Palindromes in bases 2 through 14:
A006995,
A014190,
A014192,
A029952,
A029953,
A029954,
A029803,
A029955,
A002113,
A029956,
A029957,
A029958,
A029959.
-
f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,15],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
Select[Range@ 620, PalindromeQ@ IntegerDigits[#, 15] &] (* Michael De Vlieger, May 13 2017, Version 10.3 *)
-
isok(n) = my(d=digits(n, 15)); d == Vecrev(d); \\ Michel Marcus, May 14 2017
-
from sympy import integer_log
from gmpy2 import digits
def A029960(n):
if n == 1: return 0
y = 15*(x:=15**integer_log(n>>1,15)[0])
return int((c:=n-x)*x+int(digits(c,15)[-2::-1]or'0',15) if nChai Wah Wu, Jun 14 2024
A262065
Numbers that are palindromes in base-60 representation.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 122, 183, 244, 305, 366
Offset: 1
. n | a(n) | base 60 n | a(n) | base 60
. -----+------+----------- ------+-------+--------------
. 100 | 2440 | [40, 40] 1000 | 56415 | [15, 40, 15]
. 101 | 2501 | [41, 41] 1001 | 56475 | [15, 41, 15]
. 102 | 2562 | [42, 42] 1002 | 56535 | [15, 42, 15]
. 103 | 2623 | [43, 43] 1003 | 56595 | [15, 43, 15]
. 104 | 2684 | [44, 44] 1004 | 56655 | [15, 44, 15]
. 105 | 2745 | [45, 45] 1005 | 56715 | [15, 45, 15]
. 106 | 2806 | [46, 46] 1006 | 56775 | [15, 46, 15]
. 107 | 2867 | [47, 47] 1007 | 56835 | [15, 47, 15]
. 108 | 2928 | [48, 48] 1008 | 56895 | [15, 48, 15]
. 109 | 2989 | [49, 49] 1009 | 56955 | [15, 49, 15]
. 110 | 3050 | [50, 50] 1010 | 57015 | [15, 50, 15]
. 111 | 3111 | [51, 51] 1011 | 57075 | [15, 51, 15]
. 112 | 3172 | [52, 52] 1012 | 57135 | [15, 52, 15]
. 113 | 3233 | [53, 53] 1013 | 57195 | [15, 53, 15]
. 114 | 3294 | [54, 54] 1014 | 57255 | [15, 54, 15]
. 115 | 3355 | [55, 55] 1015 | 57315 | [15, 55, 15]
. 116 | 3416 | [56, 56] 1016 | 57375 | [15, 56, 15]
. 117 | 3477 | [57, 57] 1017 | 57435 | [15, 57, 15]
. 118 | 3538 | [58, 58] 1018 | 57495 | [15, 58, 15]
. 119 | 3599 | [59, 59] 1019 | 57555 | [15, 59, 15]
. 120 | 3601 | [1, 0, 1] 1020 | 57616 | [16, 0, 16]
. 121 | 3661 | [1, 1, 1] 1021 | 57676 | [16, 1, 16]
. 122 | 3721 | [1, 2, 1] 1022 | 57736 | [16, 2, 16]
. 123 | 3781 | [1, 3, 1] 1023 | 57796 | [16, 3, 16]
. 124 | 3841 | [1, 4, 1] 1024 | 57856 | [16, 4, 16]
. 125 | 3901 | [1, 5, 1] 1025 | 57916 | [16, 5, 16] .
Corresponding sequences for bases 2 through 12:
A006995,
A014190,
A014192,
A029952,
A029953,
A029954,
A029803,
A029955,
A002113,
A029956,
A029957.
-
import Data.List.Ordered (union)
a262065 n = a262065_list !! (n-1)
a262065_list = union us vs where
us = [val60 $ bs ++ reverse bs | bs <- bss]
vs = [0..59] ++ [val60 $ bs ++ cs ++ reverse bs |
bs <- tail bss, cs <- take 60 bss]
bss = iterate s [0] where
s [] = [1]; s (59:ds) = 0 : s ds; s (d:ds) = (d + 1) : ds
val60 = foldr (\b v -> 60 * v + b) 0
-
[n: n in [0..600] | Intseq(n, 60) eq Reverse(Intseq(n, 60))]; // Vincenzo Librandi, Aug 24 2016
-
f[n_, b_]:=Module[{i=IntegerDigits[n, b]}, i==Reverse[i]]; lst={}; Do[If[f[n, 60], AppendTo[lst, n]], {n, 400}]; lst (* Vincenzo Librandi, Aug 24 2016 *)
pal60Q[n_]:=Module[{idn60=IntegerDigits[n,60]},idn60==Reverse[idn60]]; Select[Range[0,400],pal60Q] (* Harvey P. Dale, Nov 04 2017 *)
-
isok(m) = my(d=digits(m, 60)); d == Vecrev(d); \\ Michel Marcus, Jan 22 2022
-
from sympy import integer_log
from gmpy2 import digits, mpz
def A262065(n):
if n == 1: return 0
y = 60*(x:=60**integer_log(n>>1,60)[0])
return int((c:=n-x)*x+mpz(digits(c,60)[-2::-1]or'0',60) if nChai Wah Wu, Jun 13-14 2024
Comments