Smarandache Number

Author

Eric W. Weisstein
November 6, 2015

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/SmarandacheNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/SmarandacheNumber.html.

©2015 Wolfram Research, Inc. except for portions noted otherwise

Algorithms

A007908

s1=Table[FromDigits[Flatten[IntegerDigits[Range[n]]]],{n,20}]

s2=FromDigits/@Flatten/@IntegerDigits/@Flatten/@Rest[FoldList[List,{},Range[20]]]

s3=FromDigits/@Flatten/@IntegerDigits/@Rest[FoldList[Append,{},Range[20]]]

s4=FoldList[#2+#1 10^IntegerLength[#2]&,Range[20]]

s1==s2==s3==s4

IntegerLength

A058183

IntegerLength/@FoldList[#2+#1 10^IntegerLength[#2]&,Range[30]]

Table[With[{d=IntegerLength[n]},(n+1)d-(10^d-1)/9],{n,30}]

Generating function

(1/(((1-x))^2))Sum[(x^(10^j)),{j,0,∞}]

Series[(1/(((1-x))^2))Sum[x^(10^j),{j,0,20}],{x,0,10}]

Series[Normal[%],{x,0,10}]