|
Search: id:A103357
|
|
|
| A103357 |
|
Numbers n such that n and pi(n) (A000720) are palindromic. |
|
+0 6
|
|
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 262, 323, 393, 525, 535, 555, 666, 818, 878, 949, 2002, 3773, 5775, 6116, 13031, 19591, 39093, 41414, 47374, 59295, 63236, 81918, 94549, 95759, 252252, 394493, 594495, 662266, 674476, 686686, 698896, 764467
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
FORMULA
|
a(n) = P_A103358(n).
|
|
MATHEMATICA
|
NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
p = 0; a = {}; Do[p = NextPalindrome[ p]; q = IntegerDigits[ PrimePi[ p]]; If[ Reverse[q] == q, Print[{p, FromDigits[q]}]; AppendTo[a, p]], {n, 10^4}]; a (from Robert G. Wilson v Feb 03 2005)
|
|
CROSSREFS
|
Corresponding palindromic pi(n) in A103358.
Cf. A046941, A046942, A103358, A103402, A103403.
Sequence in context: A117056 A082207 A083115 this_sequence A055931 A167152 A064704
Adjacent sequences: A103354 A103355 A103356 this_sequence A103358 A103359 A103360
|
|
KEYWORD
|
easy,base,nonn
|
|
AUTHOR
|
Zak Seidov (zakseidov(AT)yahoo.com), Feb 02 2005
|
|
EXTENSIONS
|
More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Feb 03 2005
|
|
|
Search completed in 0.002 seconds
|