Smarandache-Wellin Prime

Author

Eric W. Weisstein
December 8, 2015

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/Smarandache-WellinPrime.nb.

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

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

Code

SmarandacheWellinSequence[n_]:=FoldList[#2+#1 10^IntegerLength[#2]&,Prime[Range[n]]]

SmarandacheWellin[n_]:=FromDigits[Flatten[IntegerDigits/@Prime[Range[n]]]]

Rodenkirch search

http://www.mersenneforum.org/showthread.php?t=20661

SmarandacheWellin[PrimePi[300000]]//IntegerLength

Total[IntegerLength/@Prime[Range[PrimePi[300000]]]]

Total[IntegerLength/@Prime[Range[PrimePi[420000]]]]

Total[IntegerLength/@Prime[Range[PrimePi[550000]]]]

Total[IntegerLength/@Prime[Range[PrimePi[1*^6]]]]

Primes up to

PrimePi[1*^6]

Sequence

SmarandacheWellinSequence[10]

SmarandacheWellin[10]

Primes

A046035

Flatten[Position[SmarandacheWellinSequence[1500],_?PrimeQ]]//Timing

primes={1,2,4,128,174,342,435,1429};

A046284

Prime[primes]

A069151

Select[SmarandacheWellinSequence[200],PrimeQ]//Timing

A263959

Cases[SmarandacheWellinSequence[1500],p_?PrimeQ:>IntegerLength[p]]//Timing

Check Primality

Do[
Print[{i,primes[[i]],PrimeQ[SmarandacheWellin[primes[[i]]]]//Timing}],
{i,Length[primes]}
]