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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A135551 Number of bases b, 1 < b < n, in which n is a palindrome. 7
 0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 3, 3, 3, 3, 1, 3, 4, 2, 2, 4, 2, 4, 3, 4, 2, 3, 3, 3, 3, 3, 2, 5, 2, 3, 2, 5, 2, 4, 2, 3, 4, 4, 1, 5, 2, 4, 4, 5, 1, 4, 4, 4, 4, 2, 2, 6, 2, 3, 5, 4, 5, 4, 3, 4, 2, 4, 2, 6, 3, 3, 3, 3, 2, 6, 1, 7, 3, 4, 2, 6, 5, 3, 2, 5, 2, 5, 4, 5, 4, 2, 2, 6, 2, 5, 4, 7, 2, 4, 1, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 COMMENTS Every integer n is a palindrome when expressed in unary, or in base n-1 (where it will be 11). First occurrence in A037183. a(n) is always less than A001221(n) except for 2 and 6; a(n) is always less than A001222(n) except for even powers of twos and 6, 12, 81, 243, 625, 729, 2187, 19683, 59049, ..., . - Robert G. Wilson v, Jul 17 2016 LINKS Robert G. Wilson v, Table of n, a(n) for n = 0..100000 John P. Linderman, Description of A135549-A135551 and A016038 John P. Linderman, Perl program [Use the command: BASEDELTA=0 palin.pl] FORMULA a(n) = A135549(n) + 1 for n>2; otherwise a(n) = A135549(n) = 0. - Michel Marcus, Oct 15 2014 a(n) = A126071(n) - 1. - Michel Marcus, Mar 07 2015 MATHEMATICA palindromicBases[n_] := Module[{p}, Table[p = IntegerDigits[n, b]; If[p == Reverse[p], {b, p}, Sequence @@ {}], {b, 2, n - 1}]]; Array[ Length@ palindromicBases@# &, 105, 0] (* Robert G. Wilson v, Oct 15 2014 *) palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; f[n_] := Block[{s = Ceiling@ Sqrt@ n, b = 2, c = If[ IntegerQ@ Sqrt[4n + 1], -1, 0]}, While[b < s, If[ palQ[n, b], c++]; b++]; c + Count[ Mod[n, Range[s - 1]], 0]]; f[0] = 0; Array[f, 105, 0] (* much faster for large Ns *) (* Robert G. Wilson v, Oct 20 2014 *) CROSSREFS Cf. A037183, A135549, A135550, A016038. Essentially the same as A065531. Sequence in context: A179752 A085693 A067995 * A065531 A256558 A239281 Adjacent sequences:  A135548 A135549 A135550 * A135552 A135553 A135554 KEYWORD nonn,base AUTHOR John P. Linderman, Feb 26 2008, Feb 28 2008 STATUS approved

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.

Last modified May 18 23:31 EDT 2022. Contains 353826 sequences. (Running on oeis4.)