找回密码
 欢迎注册
楼主: 无心人

[讨论] 连续素数构成的素数

[复制链接]
发表于 2008-4-23 18:38:32 | 显示全部楼层
上面的"运行到了第1000个素数""是说这个帖子的题目.
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-4-23 18:39:45 | 显示全部楼层


有这几个已经很乐观了啊
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-4-23 21:33:10 | 显示全部楼层
写了下代码:
  1. // HugeCalcDemo.cpp : Defines the entry point for the console application.
  2. //

  3. //        Project -> Setting -> C/C++ -> Code Generation --> Use run-time library:
  4. //                Win32 Debug:        Debug Multithreaded DLL
  5. //                Win32 Release:        Multithreaded DLL

  6. #include <iostream.h>

  7. #include "../../../HugeCalc_API/CppAPI/Include/HugeCalc.h"        // 公共接口
  8. #include "../../../HugeCalc_API/CppAPI/Include/HugeInt.h"         // 10进制系统
  9. #include "../../../HugeCalc_API/CppAPI/Include/HugeIntX.h"        // 16进制系统

  10. #pragma message( "automatic link to ../../../HugeCalc_API/CppAPI/Lib/HugeCalc.lib" )
  11. #pragma comment( lib, "../../../HugeCalc_API/CppAPI/Lib/HugeCalc.lib" )


  12. int main(int argc, char* argv[])
  13. {
  14. //        printf("Hello World!\n");

  15.         cout << "Call " << HugeCalc::GetVer() << endl << endl;

  16.         if ( HC_LICENSE_NONE == HugeCalc::GetLicenseLevel())
  17.         {
  18.                 cout << endl << "警告:您未通过 HugeCalc.dll 的许可认证!" \
  19.                         << endl << endl << "解决方案可选下列方案之一:" \
  20.                         << endl <<        "    一、请将本程序移动到“/CopyrightByGuoXianqiang/[../]”目录下运行;" \
  21.                         << endl <<        "    二、或请在 HugeCalc.chm 中进行注册(一劳永逸)。" \
  22.                         << endl << endl;
  23.                 system( "pause" );
  24.                 return (-1);
  25.         }

  26.         CHugeInt hugeNum;

  27.         UINT32 i, j, k = 1;
  28.         UINT32 u32LBound, u32UBound;
  29.         UINT32 u32BufferSize;
  30.         UINT32 *p, *lpPrimeBuffer;

  31.         // 初始化
  32.         HugeCalc::EnableTimer( TRUE );
  33.         HugeCalc::ResetTimer();

  34.         u32LBound = 1;
  35.         u32UBound = 10;
  36.         for ( i = 1; i < 8; ++i )
  37.         {
  38.                 u32BufferSize = HugeCalc::GetPrimeCount( u32LBound, u32UBound );
  39.                 lpPrimeBuffer = new UINT32[ u32BufferSize ];

  40.                 HugeCalc::GetPrimeList( lpPrimeBuffer, u32BufferSize, u32LBound, u32UBound );
  41.                 for ( j=0, p=lpPrimeBuffer; j<u32BufferSize; ++j, ++p )
  42.                 {
  43.                         hugeNum.DecLShift( i ) += *p;

  44.                         if ( hugeNum.IsPrime() )
  45.                         {
  46.                                 cout << endl << "No." << k + j << "\tPrime=" << *p
  47.                                         << "\tTotal Digits = " << hugeNum.GetDigits();
  48.                         }
  49.                 }

  50.                 k += u32BufferSize;
  51.                 delete []lpPrimeBuffer;
  52.        
  53.                 cout << endl << "已耗时:" << HugeCalc::GetTimerStr( FT_DOT06SEC_s ) << endl << endl;

  54.                 u32LBound = u32UBound;
  55.                 u32UBound *= 10;
  56.         }

  57.         system( "pause" );

  58.         return 0;
  59. }
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-4-23 21:38:21 | 显示全部楼层


这个题目有结果的
搜到了结果
不过看不太明白

你运行下
看和网上结果比较下

http://mathworld.wolfram.com/Smarandache-WellinNumber.html
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-4-23 21:46:24 | 显示全部楼层
老早就曾想到这个题目,感觉很有趣,但意义似乎不大,

没想到已专门给了这类数一个名称:
  The $n$th Smarandache-Wellin number is the consecutive number sequence consisting of a concatenation of the digits of the first $n$ primes

我运行了一下程序,与 14# 所给链接数据一致。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-4-23 21:49:37 | 显示全部楼层


那可以找更大的素数的
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-4-20 02:15 , Processed in 0.211260 second(s), 14 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表