Smarandache Sequences

Author

Eric W. Weisstein
September 27, 2005

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

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

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

. Concatenation of n Copies of n

NCopies[n_]:=FromDigits[Flatten[IntegerDigits/@Table[n,{n}]]]
SetAttributes[NCopies,Listable]

NCopies[Range[10]]

Table[(10^n-1)n/9,{n,11}]

Digits[n_]:=Length[IntegerDigits[n]]

Table[n(10^(n Digits[n])-1)/(10^Digits[n]-1),{n,11}]

Table[Plus@@DigitCount[n],{n,100}]

Table[ Floor[Log[10,n]]+1,{n,100}]

Primes

Select[NCopies[Range[1000]],PrimeQ]//Timing

. Smarandache Fibonacci

SetAttributes[FibonacciConcatenation,Listable]
FibonacciConcatenation[1]:=1
FibonacciConcatenation[n_]:=FibonacciConcatenation[n]=FromDigits[Flatten[IntegerDigits/@{FibonacciConcatenation[n-1],Fibonacci[n]}]]

FibonacciConcatenation[Range[500]];//Timing

Remove[FibonacciConcatenation]

SetAttributes[FibonacciConcatenation,Listable]
FibonacciConcatenation[n_]:=FromDigits[Flatten[IntegerDigits/@Fibonacci[Range[n]]]]

FibonacciConcatenation[Range[500]];//Timing

FibonacciConcatenation[Range[10]]

Select[FibonacciConcatenation[Range[200]],PrimeQ]//Timing

SmarandacheFibonacciQ[19448047080036]

Smaradache Ceil

SmarandacheCeilR[k_,n_]:=Module[{x=SmarandacheCeil[k,n]},
		If[x==n,0,x]
]

Table[Select[Table[SmarandacheCeilR[j,i],{i,30}],#!=0&],{j,4}]

TableForm[Table[SmarandacheCeil[j,i],{j,4},{i,20}],TableHeadings->{Automatic,None},TableSpacing->1,TableAlignments->Right]

Smarandache Crescendo

Table[SmarandacheCrescendo[n],{n,0,50}]

Flatten[
	Position[Join[{False,False},Table[SmarandacheFibonacciQ[i],{i,3,1000}]],True]]

Smarandache Radu

SmarandacheRaduQ[n_]:=Module[{r,l={Smarandache[n],Smarandache[n+1]}},
		r=Range[Min[l],Max[l]];
		If[r=={} || Union[PrimeQ[r]]=={False},True,False]
]

Flatten[Position[Table[SmarandacheRaduQ[i],{i,2060}],True]]

SmarandacheRaduQ[265225]

Smarandache Function

s1=Read["Phosphine:Math Lists:SmarandacheS1-10k.txt"];

N[s1,30]

2 3 4 5 9 7 32 27 25 11 243 13 49 125 4096 17 2187 19 625 343 121 23
59049 3125 169 177147 2401 29 78125 31 134217728 1331 289 16807
43046721 37 361 2197 1953125 41 117649 43 14641 9765625 529 47

sl=LargestTerms[Read["Phosphine:Math Lists:Smarandache10k.txt"]];

sl[[1]]

Take[sl[[1]],20]

Take[sl[[2]],20]

Union[sl[[1]]-sl[[2]]]

Square-digital Sequence

Select[FromDigits/@(Table[IntegerDigits[i,4],{i,1000}] /. {2->4,3->9}),Square]

Cube-digital Sequence

Select[FromDigits/@(Table[IntegerDigits[i,3],{i,20000}] /. 2->8),Cubic]

Smarandache primes

Repunit[n_]:=(10^n-1)/9

Select[Table[Prime[n],{n,500}],PrimeQ/@And@@Union[IntegerDigits[#]]&]

Prime 1

prime1=2255725272 Repunit[15600]/Repunit[10]+1;

IntegerDigits[prime1]//Length

Union[IntegerDigits[prime1]]

PrimeQ[prime1]//Timing

Prime 2

prime2=2255737522 Repunit[15600]/Repunit[10]+1;

IntegerDigits[prime2]//Length

Union[IntegerDigits[prime2]]

PrimeQ[prime2]//Timing