OFFSET
1,2
COMMENTS
Partial sums of A002048. - Reinhard Zumkeller, May 23 2013
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
Reinhard Zumkeller, Table of n, a(n) for n = 1..3000
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.
FORMULA
Andrews conjectures that a(n) ~ (1/2) n^2 log n / loglog n. - N. J. A. Sloane, Dec 01 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. *)
PROG
(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
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
STATUS
approved