Search: id:A002048 Results 1-1 of 1 results found. %I A002048 M0972 N0363 %S A002048 1,2,4,5,8,10,14,15,16,21,22,25,26,28,33,34,35,36,38,40,42,46,48,49,50, %T A002048 53,57,60,62,64,65,70,77,80,81,83,85,86,90,91,92,100,104,107,108,116, %U A002048 119,124,127,132,133,137,141,144,145,148,150,151,154,158,159,163,165 %N A002048 Segmented numbers, or prime numbers of measurement. %D A002048 G. E. Andrews, MacMahon's prime numbers of measurement, Amer. Math. Monthly, 82 (1975), 922-923. %D A002048 R. K. Guy, Unsolved Problems in Number Theory, E30. %D A002048 P. A. MacMahon, The prime numbers of measurement on a scale, Proc. Camb. Phil. Soc. 21 (1923), 651-654; reprinted in Coll. Papers I, pp. 797-800. %D A002048 Problem E1910, Amer. Math. Monthly, 75 (1968), 80-81. %D A002048 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002048 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002048 R. J. Mathar, Table of n, a(n) for n = 1..7836 %H A002048 Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics. %p A002048 (Maple program from R. J. Mathar, Jun 04 2006) A002048 := proc(anmax::integer, printlist::boolean) %p A002048 local a, asum,su,i,piv,j; %p A002048 a := []; %p A002048 for i from 1 to anmax do %p A002048 a := [op(a),i]; %p A002048 od: %p A002048 if printlist then %p A002048 printf("%d %d\n",1,a[1]); %p A002048 printf("%d %d\n",2,a[2]); %p A002048 fi; %p A002048 asum := [a[1]+a[2],a[2]]; %p A002048 for i from 3 to anmax do %p A002048 asum := [op(asum),0]; %p A002048 od: %p A002048 piv := 3; %p A002048 while piv <= nops(a) do %p A002048 for i from 1 to piv-2 do %p A002048 a := remove(has,a, asum[i]); %p A002048 od: %p A002048 if printlist then %p A002048 printf("%a %a\n",piv,a[piv]); %p A002048 fi; %p A002048 for i from 1 to piv do %p A002048 asum := subsop(i=asum[i]+a[piv], asum); %p A002048 od: %p A002048 piv := piv+1; %p A002048 od; %p A002048 RETURN(a); %p A002048 end: %p A002048 A002048(40000,true); %o A002048 (C++) #include #include #include #define NMAX 400 using namespace std; int main(int argc, char *argv[]) { vector a; for(int i=0; i< NMAX; i++) a.push_back(i+1); for(int piv=2; piv < a.size(); piv++) for(int i=0; i < piv-1 && i < a.size()-1; i++) { int su= a[i]+a[i+1]; remove(a.begin(),a.end(),su); for(int j=i+2; j < piv && j < a.size(); j++) { su += a[j]; remove(a.begin(), a.end(),su); if(su > NMAX) break; } } for(int i=0; i < a.size() && a[i] < NMAX; i++) cout << a[i] << ","; return 0; } - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 31 2006 %Y A002048 Cf. A002049. %Y A002048 Sequence in context: A057129 A036404 A018498 this_sequence A067941 A092265 A163295 %Y A002048 Adjacent sequences: A002045 A002046 A002047 this_sequence A002049 A002050 A002051 %K A002048 nonn,nice %O A002048 1,2 %A A002048 N. J. A. Sloane (njas(AT)research.att.com). %E A002048 More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 31 2006 Search completed in 0.002 seconds