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.

A135549 Number of bases b, 1 < b < n-1, in which n is a palindrome.

This page as a plain text file.
%I A135549 #28 Apr 14 2020 18:21:34
%S A135549 0,0,0,0,0,1,0,1,1,1,2,0,1,1,1,2,2,2,2,0,2,3,1,1,3,1,3,2,3,1,2,2,2,2,
%T A135549 2,1,4,1,2,1,4,1,3,1,2,3,3,0,4,1,3,3,4,0,3,3,3,3,1,1,5,1,2,4,3,4,3,2,
%U A135549 3,1,3,1,5,2,2,2,2,1,5,0,6,2,3,1,5,4,2,1,4,1,4,3,4,3,1,1,5,1,4,3,6,1,3,0,5
%N A135549 Number of bases b, 1 < b < n-1, in which n is a palindrome.
%C A135549 Every integer n is a palindrome when expressed in unary, or in base n-1 (where it will be 11). So here we assume 1 < b < n-1.
%C A135549 Records for a(n)>=1 are in A107129. - _Dmitry Kamenetsky_, Oct 22 2015
%H A135549 T. D. Noe, <a href="/A135549/b135549.txt">Table of n, a(n) for n = 0..10000</a>
%H A135549 John P. Linderman, <a href="/A135549/a135549.html">Description of A135549-A135551 and A016038</a>
%H A135549 John P. Linderman, <a href="/A135549/a135549.txt">Perl program</a> [Use the command: palin.pl]
%F A135549 a(n) = A065531(n)-1 = A126071(n)-2 for n>2. - _T. D. Noe_, Feb 28 2008
%t A135549 a = {0, 0, 0}; For[n = 4, n < 100, n++, c = 0; For[b = 2, b < n - 1, b++, If[IntegerDigits[n, b] == Reverse[IntegerDigits[n, b]], c++ ]]; AppendTo[a, c]]; a (* _Stefan Steinerberger_, Feb 27 2008 *)
%t A135549 Table[cnt=0; Do[d=IntegerDigits[n,b]; If[d==Reverse[d], cnt++ ], {b,2,n-2}]; cnt, {n,0,100}] (* _T. D. Noe_, Feb 28 2008 *)
%t A135549 Table[Total[Boole[Table[PalindromeQ[IntegerDigits[n,b]],{b,2,n-2}]]],{n,0,120}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 14 2020 *)
%Y A135549 Cf. A016038, A037183, A065531, A107129, A135550, A135551.
%Y A135549 Cf. A016038 (non-palindromic numbers in any base 1 < b < n-1)
%K A135549 nonn,base
%O A135549 0,11
%A A135549 _John P. Linderman_, Feb 26 2008, Feb 28 2008