This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A002049 M2633 N1044 #45 Sep 02 2025 09:22:38 %S A002049 1,3,7,12,20,30,44,59,75,96,118,143,169,197,230,264,299,335,373,413, %T A002049 455,501,549,598,648,701,758,818,880,944,1009,1079,1156,1236,1317, %U A002049 1400,1485,1571,1661,1752,1844,1944,2048,2155,2263,2379,2498,2622,2749,2881 %N A002049 Prime numbers of measurement. %C A002049 Partial sums of A002048. - _Reinhard Zumkeller_, May 23 2013 %D A002049 R. K. Guy, Unsolved Problems in Number Theory, E30. %D A002049 Š. Porubský, On MacMahon's segmented numbers and related sequences. Nieuw Arch. Wisk. (3) 25 (1977), no. 3, 403--408. MR0485763 (58 #5575) %D A002049 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002049 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002049 Chai Wah Wu, <a href="/A002049/b002049.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..3000 from Reinhard Zumkeller) %H A002049 G. E. Andrews, <a href="http://www.jstor.org/stable/2318498">MacMahon's prime numbers of measurement</a>, Amer. Math. Monthly, 82 (1975), 922-923. %H A002049 R. L. Graham and C. B. A. Peck, <a href="http://www.jstor.org/stable/2315138">Problem E1910</a>, Amer. Math. Monthly, 75 (1968), 80-81. %H A002049 P. A. MacMahon, <a href="https://www.biodiversitylibrary.org/item/88477#page/679/mode/1up">The prime numbers of measurement on a scale</a>, Proc. Camb. Phil. Soc. 21 (1923), 651-654; reprinted in Coll. Papers I, pp. 797-800. %F A002049 Andrews conjectures that a(n) ~ (1/2) n^2 log n / loglog n. - _N. J. A. Sloane_, Dec 01 2013 %t A002049 A002048[anmax_] := (a = {}; Do[AppendTo[a, i], {i, 1, anmax}]; asum = {a[[1]] + a[[2]], a[[2]]}; Do[AppendTo[asum, 0], {i, 3, anmax}]; piv = 3; While[piv <= Length[a], Do[a = DeleteCases[a, asum[[i]]], {i, 1, piv - 2}]; Do[asum[[i]] += a[[piv]], {i, 1, piv}]; piv = piv + 1;]; a); A002048[200] // Accumulate (* _Jean-François Alcover_, Oct 05 2016, adapted from _R. J. Mathar_'s Maple code in A002048. *) %o A002049 (Haskell) %o A002049 import Data.List ((\\)) %o A002049 a002049 n = a002049_list !! (n-1) %o A002049 a002049_list = g [1..] [] where %o A002049 g (x:xs) ys = (last zs) : g (xs \\ zs) (x : ys) where %o A002049 zs = scanl (+) x ys %o A002049 -- _Reinhard Zumkeller_, May 23 2013 %o A002049 (Python) %o A002049 from itertools import count, accumulate, islice %o A002049 from collections import deque %o A002049 def A002049_gen(): # generator of terms %o A002049 aset, alist, c = set(), deque(), 0 %o A002049 for k in count(1): %o A002049 if k in aset: %o A002049 aset.remove(k) %o A002049 else: %o A002049 yield (c:=c+k) %o A002049 aset |= set(k+d for d in accumulate(alist)) %o A002049 alist.appendleft(k) %o A002049 A002049_list = list(islice(A002049_gen(),20)) # _Chai Wah Wu_, Sep 01 2025 %Y A002049 Cf. A002048. %Y A002049 a(n) = A004978(n+1)-1 = A048204(n-1)+1. %K A002049 nonn,nice,changed %O A002049 1,2 %A A002049 _N. J. A. Sloane_