A097228 Numbers n such that the product of digits of n equals the concatenation of pi(d)'s where d runs through the digits of n.
27, 38, 127, 138, 289, 298, 1127, 1138, 1289, 1298, 11127, 11138, 11289, 11298, 111127, 111138, 111289, 111298, 1111127, 1111138, 1111289, 1111298, 11111127, 11111138, 11111289, 11111298, 111111127, 111111138, 111111289, 111111298
Offset: 1
Examples
298 is in the sequence because 2*9*8 = 144 = concatenate(pi(2), pi(9), pi(8)) = concatenate(1, 4, 4).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 11, 0, 0, 0, -10).
Crossrefs
Cf. A097227.
Programs
-
Mathematica
h[a_]:=(v1={};Do[l=Length[a];v1=Join[v1, IntegerDigits[a[[n]]]], {n, l}]; FromDigits[v1]);v={};Do[h1=IntegerDigits[n];l=Length[h1]; p=Product[h1[[k]], {k, l}];s=Sum[h1[[k]], {k, l}];If[p>0&& p==h[PrimePi[h1]], v=Append[v, n];Print[v]], {n, 300000000}] LinearRecurrence[{0,0,0,11,0,0,0,-10},{27,38,127,138,289,298,1127,1138,1289,1298},30] (* Harvey P. Dale, Jan 01 2019 *)
-
Python
from _future_ import division A097228_list = [27,38] + [1000*(10**k-1)//9+d for k in range(20) for d in [127,138,289,298]] # Chai Wah Wu, Aug 10 2017
Formula
From Chai Wah Wu, Aug 10 2017: (Start)
a(n) = 11*a(n-4) - 10*a(n-8) for n > 10.
G.f.: x*(-1600*x^9 - 1620*x^8 - 380*x^7 - 270*x^6 - 120*x^5 - 8*x^4 + 138*x^3 + 127*x^2 + 38*x + 27)/(10*x^8 - 11*x^4 + 1). (End)
Comments