login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250411 Palindromic in bases 10 and 27. 21

%I #9 Sep 08 2022 08:46:10

%S 0,1,2,3,4,5,6,7,8,9,11,22,252,616,757,838,919,10301,13031,15951,

%T 17871,65856,1197911,2287822,4385834,5475745,5549455,6278726,6639366,

%U 7368637,7573757,8663668,8737378,9392939,9466649,9827289,67166176,214171412,609808906,836040638,2132882312,2487997842

%N Palindromic in bases 10 and 27.

%H Robert G. Wilson v, <a href="/A250411/b250411.txt">Table of n, a(n) for n = 1..84</a>

%t palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; genPal[n_] := Block[{id = IntegerDigits@ n, insert = {{}, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}}}, FromDigits@ Join[id, #, Reverse@ id] & /@ insert]; k = 1; lst = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; While[k < 1000001, s = Select[ genPal[k], palQ[#, 27] &]; If[s != {}, AppendTo[lst, s]; Print@ s; lst = Sort@ Flatten@ lst]; k++]; lst

%t b1=10; b2=36; 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_, Nov 23 2014 *)

%o (Magma) [n: n in [0..10000000] | Intseq(n, 10) eq Reverse(Intseq(n, 10))and Intseq(n, 27) eq Reverse(Intseq(n, 27))]; // _Vincenzo Librandi_, Nov 23 2014

%Y Cf. A007632, A007633, A029961, A029962, A029963, A029964, A029804, A029965, A029966, A029967, A029968, A029969, A029970, A029731, A097855, A250408, A250409, A250410, A099165, A250412.

%K nonn,base

%O 1,3

%A _Robert G. Wilson v_, Nov 23 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)