Smarandache-Wellin primes: Difference between revisions

→‎J: faster digit retrieval
(→‎J: add a first draft)
(→‎J: faster digit retrieval)
Line 458:
=={{header|J}}==
<syntaxhighlight lang="j"> derive=. [: <:@#/.~ i.@10 , ]
digits=. ;@:(<@(10&#".inv"0@":)"0)
(#~ 1&p:) 10&#.@digits\ p: i. 10
2 23 2357
 
(#~ 1& p: {:"1) (# , 10x&#.@digits@derive@digits)\ p: i. 3001200
4194123321127 547233879626521 547233979727521 13672766322929571043 3916856106393739943689</syntaxhighlight>
32 4194123321127
72 547233879626521
73 547233979727521
134 13672766322929571043
225 3916856106393739943689
303 462696313560586013558131
309 532727113760586013758133
363 6430314317473636515467149
462 8734722823685889120488197
490 9035923128899919621189209
495 9036023329699969621389211
522 9337023533410210710923191219
538 94374237357103109113243102223
624 117416265406198131121272110263
721 141459282456260193137317129313
738 144466284461264224139325131317
790 156483290479273277162351153339
852 164518312512286294233375158359
1087 208614364610327343341589284471
1188 229667386663354357356628334581</syntaxhighlight>
 
=={{header|Java}}==
559

edits