A002049 Prime numbers of measurement.
1, 3, 7, 12, 20, 30, 44, 59, 75, 96, 118, 143, 169, 197, 230, 264, 299, 335, 373, 413, 455, 501, 549, 598, 648, 701, 758, 818, 880, 944, 1009, 1079, 1156, 1236, 1317, 1400, 1485, 1571, 1661, 1752, 1844, 1944, 2048, 2155, 2263, 2379, 2498, 2622, 2749, 2881
Offset: 1
References
- R. K. Guy, Unsolved Problems in Number Theory, E30.
- Š. Porubský, On MacMahon's segmented numbers and related sequences. Nieuw Arch. Wisk. (3) 25 (1977), no. 3, 403--408. MR0485763 (58 #5575)
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..3000 from Reinhard Zumkeller)
- G. E. Andrews, MacMahon's prime numbers of measurement, Amer. Math. Monthly, 82 (1975), 922-923.
- R. L. Graham and C. B. A. Peck, Problem E1910, Amer. Math. Monthly, 75 (1968), 80-81.
- 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.
Programs
-
Haskell
import Data.List ((\\)) a002049 n = a002049_list !! (n-1) a002049_list = g [1..] [] where g (x:xs) ys = (last zs) : g (xs \\ zs) (x : ys) where zs = scanl (+) x ys -- Reinhard Zumkeller, May 23 2013
-
Mathematica
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. *)
-
Python
from itertools import count, accumulate, islice from collections import deque def A002049_gen(): # generator of terms aset, alist, c = set(), deque(), 0 for k in count(1): if k in aset: aset.remove(k) else: yield (c:=c+k) aset |= set(k+d for d in accumulate(alist)) alist.appendleft(k) A002049_list = list(islice(A002049_gen(),20)) # Chai Wah Wu, Sep 01 2025
Formula
Andrews conjectures that a(n) ~ (1/2) n^2 log n / loglog n. - N. J. A. Sloane, Dec 01 2013
Comments