The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A117058 Palindromes for which the product of the digits is prime. 2
 2, 3, 5, 7, 121, 131, 151, 171, 11211, 11311, 11511, 11711, 1112111, 1113111, 1115111, 1117111, 111121111, 111131111, 111151111, 111171111, 11111211111, 11111311111, 11111511111, 11111711111, 1111112111111, 1111113111111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (1,0,0,110,-110,0,0,-1000,1000). FORMULA From Chai Wah Wu, Nov 13 2018: (Start) a(n) = a(n-1) + 110*a(n-4) - 110*a(n-5) - 1000*a(n-8) + 1000*a(n-9) for n > 9. G.f.: x*(-500*x^8 + 200*x^7 + 200*x^6 + 100*x^5 + 106*x^4 - 2*x^3 - 2*x^2 - x - 2)/((x - 1)*(10*x^2 - 1)*(10*x^2 + 1)*(10*x^4 - 1)). (End) EXAMPLE 11211 is in the sequence because it is a palindrome and the product of its digits 1*1*2*1*1=2 is a prime. MATHEMATICA Sort[Flatten[Table[NestList[FromDigits[Flatten[{1, IntegerDigits[#], 1}]] &, n, 6], {n, Prime[Range[4]]}]]] (* Jayanta Basu, Jul 13 2013 *) LinearRecurrence[{1, 0, 0, 110, -110, 0, 0, -1000, 1000}, {2, 3, 5, 7, 121, 131, 151, 171, 11211}, 40] (* Vincenzo Librandi, Nov 14 2018 *) PROG (PARI) isok(n) = my(d=digits(n)); (Vecrev(d) == d) && isprime(vecprod(d)); \\ Michel Marcus, Nov 14 2018 (MAGMA) I:=[2, 3, 5, 7, 121, 131, 151, 171, 11211]; [n le 9 select I[n] else Self(n-1)+110*Self(n-4)-110*Self(n-5)-1000*Self(n-8)+1000*Self(n-9): n in [1..30]]; // Vincenzo Librandi, Nov 14 2018 CROSSREFS Cf. A002113. Sequence in context: A119835 A076609 A117059 * A067173 A340113 A090718 Adjacent sequences:  A117055 A117056 A117057 * A117059 A117060 A117061 KEYWORD base,easy,nonn AUTHOR Luc Stevens (lms022(AT)yahoo.com), Apr 16 2006 STATUS approved

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

Last modified December 3 18:19 EST 2021. Contains 349467 sequences. (Running on oeis4.)