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!)
A137180 Number of palindromes in the range [1,n] inclusive. 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
A136687 - 1.
REFERENCES
Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 71.
LINKS
MATHEMATICA
nthPalindrome[n_] := Block[{q = n + 1 - 10^Floor[ Log10[n + 1 - 10^Floor[ Log10[ n/10]] ]], c = Sum[ Floor[ Floor[ n/(11*10^(k - 1) - 1)]/(Floor[ n/(11*10^(k - 1) - 1)] - 1/10)] - Floor[ Floor[ n/(2*10^k - 1)]/(Floor[ n/(2*10^k - 1)] - 1/10)], {k, Floor[ Log10[ n]] }]}, Mod[q, 10]*11^c*10^Floor[ Log10[ q]] + Sum[ Floor[ Mod[q, 10^(k + 1)]/10^k]*10^(Floor[ Log10[ q]] - k) (10^(2 k + c) + 1) , {k, Floor[ Log10[ q]] }]];
palindromicPi[n_] := Block[{q = Floor[ n*10^-Floor[ Log10[ 10 n]/2]]}, r = q + 10^(Floor[ Log10[ q]] + Mod[ Floor[ Log10[ n]], 2]) - 1; r + Floor[ Tanh[n - nthPalindrome[ r]] ]]; (* after the work of Eric A. Schmidt, see A002113 *)
f[n_] := If[n < 1, 0, palindromicPi@ n]; Array[f, 75, 0] (* Robert G. Wilson v, Sep 22 2014 *)
CROSSREFS
Sequence in context: A185137 A368906 A368993 * A258632 A263283 A128635
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Apr 21 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 13:08 EDT 2024. Contains 372480 sequences. (Running on oeis4.)