[go: up one dir, main page]

login
Composite numbers that are equal to the sum of the first k composites for some k.
7

%I #24 Nov 26 2022 13:21:03

%S 4,10,18,27,49,63,78,94,112,132,153,175,224,250,305,335,400,434,469,

%T 505,543,582,622,664,708,753,799,847,896,946,1158,1214,1271,1329,1389,

%U 1514,1578,1643,1846,1916,1988,2062,2290,2368,2448,2529,2611,2695,2780,2866

%N Composite numbers that are equal to the sum of the first k composites for some k.

%H Harvey P. Dale, <a href="/A013921/b013921.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A053767(A013919(n)). [Found by LODA miner] - _Christian Krause_, Nov 24 2022

%t Module[{nn=100,comps},comps=Complement[Range[4,nn],Prime[ Range[ PrimePi[ nn]]]]; Select[Accumulate[comps],!PrimeQ[#]&]] (* _Harvey P. Dale_, May 21 2014 *)

%o (PARI) isok(c) = if ((c>1) && !isprime(c), my(s=0); forcomposite(x=1, oo, s+=x; if (s == c, return(1)); if (s > c, return(0)))); \\ _Michel Marcus_, Nov 25 2022

%Y Cf. A013919, A013920, A053767.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, _Henri Lifchitz_

%E More terms from _David W. Wilson_

%E Name edited by _Michel Marcus_, Nov 25 2022