cp's OEIS Frontend

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.

Previous Showing 11-20 of 24 results. Next

A129749 Numbers k that divide the sum of the first k nonprimes.

Original entry on oeis.org

1, 8, 32, 44, 577, 5066, 5669, 8615, 39787, 59689, 109752, 146328, 15451380, 22173220, 28558717, 332573533, 1837410366, 3289933379, 19053646133, 370648112641
Offset: 1

Views

Author

J. M. Bergot, May 14 2007

Keywords

Comments

A variant of A045345 and A053781.
a(21) > 10^12. - Donovan Johnson, May 20 2010

Examples

			The sum of the first 44 nonprimes is 1452 = 33*44.
		

Crossrefs

Cf. A045345 (n divides sum of first n primes), A053781 (n divides sum of first n composites), A018252 (nonprimes), A051349 (sum of first n nonprimes).

Programs

  • Maple
    np:=proc(j) if isprime(j)=false then j else fi end: NP:=[seq(np(j),j=1..50000)]: a:=proc(n) if type(add(NP[j],j=1..n)/n,integer)=true then n else fi end: seq(a(n),n=1..nops(NP)); # Emeric Deutsch, May 16 2007
  • Mathematica
    Module[{nn=150000,np},np=Accumulate[Select[Range[nn],!PrimeQ[#]&]];Select[Thread[ {np,Range[Length[np]]}],Mod[#[[1]],#[[2]]]==0&]][[;;,2]] (* The program generates the first 11 terms of the sequence. To generate more, increase the nn constant. *) (* Harvey P. Dale, Jan 04 2024 *)

Extensions

Edited and a(5) to a(18) added by Klaus Brockhaus, May 17 2007
a(19) from Donovan Johnson, Sep 19 2009
a(20) from Donovan Johnson, May 20 2010

A160758 Integer averages of first n nonprime numbers for some n.

Original entry on oeis.org

1, 8, 25, 33, 359, 2948, 3291, 4959, 22350, 33357, 60907, 80962, 8276347, 11856980, 15254419, 176009996, 967538242, 1729774831, 9977169279, 193005936726
Offset: 1

Views

Author

Daniel Tisdale, May 25 2009

Keywords

Comments

A variant of A050248 for nonprimes.
Numbers n such that (1/n)*sum(j=1..n, A018252(j)) is an integer. - Robert G. Wilson v, Jun 05 2009

Examples

			The sum of the first 44 nonprimes is 1452. 1452 / 44 = 33, hence 33 is in the sequence.
		

Crossrefs

Cf. A050248, integer averages of n primes for some n.

Programs

  • Magma
    S:=[]; a:=0; c:=0; for n in [1..40000000] do if not IsPrime(n) then a+:=n; c+:=1; if a mod c eq 0 then Append(~S, a div c); end if; end if; end for; S; // Klaus Brockhaus, Aug 11 2009
  • Mathematica
    lst = {}; s = 0; c = 0; k = 1; While[k < 2700000000, If[ !PrimeQ@k, c++; s = s + k; If[Mod[s, c] == 0, AppendTo[lst, s/c]]]; k++ ]; lst (* Robert G. Wilson v, Jun 05 2009 *)
    a=0;lst={};Do[If[ !PrimeQ[n],m=n;a+=m;If[a/n==IntegerPart[a/n],AppendTo[lst,a/n]]],{n,9!}];lst

Formula

a(n) = A164280(n) / A129749(n).

Extensions

a(6) - a(16) from Robert G. Wilson v, Jun 05 2009
a(17) - a(19) from Donovan Johnson, Sep 16 2009
Edited by N. J. A. Sloane, May 11 2010
a(20) from Donovan Johnson, May 20 2010

A060697 The sum of the first a(n) composite numbers plus 1 is a prime.

Original entry on oeis.org

1, 2, 3, 8, 10, 16, 21, 29, 34, 45, 49, 52, 84, 104, 114, 123, 130, 161, 165, 170, 181, 185, 192, 202, 216, 227, 228, 240, 245, 246, 265, 266, 271, 281, 287, 295, 301, 325, 331, 355, 390, 395, 400, 406, 410, 416, 429, 498, 502, 517, 522, 527, 529, 538, 539
Offset: 1

Views

Author

Robert G. Wilson v, Apr 20 2001

Keywords

Crossrefs

Programs

A071411 "Sum of n first primes" minus "sum of first n nonprimes".

Original entry on oeis.org

1, 0, -1, -2, 0, 3, 8, 13, 21, 34, 47, 64, 84, 105, 128, 156, 189, 223, 262, 303, 344, 390, 439, 493, 554, 617, 681, 748, 815, 884, 966, 1051, 1140, 1230, 1329, 1429, 1534, 1643, 1755, 1872, 1994, 2117, 2248, 2379, 2513, 2648, 2794, 2951, 3110, 3270, 3433, 3600, 3767, 3943, 4124, 4310, 4501, 4692, 4888
Offset: 1

Views

Author

Benoit Cloitre, Jun 23 2002

Keywords

Programs

  • PARI
    for(n=1, 100, s=2; while(sum(i=1, s, 1-isprime(i))
    				

Formula

a(n) = A007504(n) - A051349(n). Cf. A024850.
Partial sums of A014237.

Extensions

Corrected and edited by Jaroslav Krizek, Jun 17 2009

A133784 Positive integers n such that the sum of all primes <= n divides n(n+1)/2.

Original entry on oeis.org

4, 21, 24, 71
Offset: 1

Views

Author

Keywords

Comments

Also, positive integers n for which the sum of all primes <= n divides the sum of all nonprimes <= n.
Is this sequence finite?
No other terms below 10^13. - Max Alekseyev, Nov 28 2017
Sequence is probably complete; integral_{x=10^10..infinity} (2 log x)/x^2 dx = 4.80517... * 10^-9. - Charles R Greathouse IV, Mar 21 2013

Examples

			n=21 is in this sequence since the sum of the primes <=21 is 2+3+5+7+11+13+17+19=77 and 77 divides 21*22/2=231.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,snp,sp; snp:=1; sp:=2; for i from 3 by 1 to n do if isprime(i) then sp:=sp+i; else snp:=snp+i; fi; if trunc(snp/sp)=snp/sp then print(i); fi; od; end: P(10000000);
  • Mathematica
    Select[Range[2,100],Divisible[(#(#+1))/2,Total[Prime[Range[ PrimePi[ #]]]]]&] (* Harvey P. Dale, May 31 2012 *)
  • PARI
    A=1;P=0;for(n=2,1e9,A+=n;P+=isprime(n)*n;if(A%P==0,print1(n", "))) \\ Charles R Greathouse IV, Mar 21 2013

Extensions

Edited by Max Alekseyev, Feb 13 2009

A140235 Partial sum of non-semiprimes A100959.

Original entry on oeis.org

1, 3, 6, 11, 18, 26, 37, 49, 62, 78, 95, 113, 132, 152, 175, 199, 226, 254, 283, 313, 344, 376, 412, 449, 489, 530, 572, 615, 659, 704, 751, 799, 849, 901, 954, 1008, 1064, 1123, 1183, 1244, 1307, 1371, 1437, 1504, 1572, 1642, 1713, 1785, 1858, 1933, 2009
Offset: 1

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A051352 is to primes A000040. Equivalently, this is to non-semiprimes A100959 as A051349 is to nonprimes A018252.

Examples

			a(5) = 18 = 1 + 2 + 3 + 5 + 7.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Range[100],PrimeOmega[#]!=2&]] (* Harvey P. Dale, Aug 22 2021 *)

Formula

a(n) = Sum{k=1..n} A100959(k).

Extensions

Corrected and edited by Giovanni Resta, Jun 20 2016

A163061 Sum of the first n primes plus the first n nonprimes.

Original entry on oeis.org

2, 6, 15, 28, 47, 69, 96, 127, 164, 208, 255, 310, 371, 435, 504, 581, 665, 752, 846, 945, 1048, 1159, 1275, 1398, 1530, 1667, 1808, 1954, 2103, 2258, 2429, 2605, 2788, 2975, 3173, 3374, 3582, 3797, 4018, 4246, 4481, 4719, 4968, 5221, 5480, 5742
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 21 2009

Keywords

Examples

			a(1)=2+0=2. a(2)=5+1=6. a(3)=10+5=15. a(4)=17+11=28. a(5)=28+19=47. a(6)=41+28=69. a(7)=58+38=96.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=80,np,len},np=Select[Range[0,nn],!PrimeQ[#]&];len=Length[np];Total/@ Thread[{Accumulate[np],Accumulate[Prime[Range[len]]]}]] (* Harvey P. Dale, Jun 14 2019 *)

Formula

a(n)=A007504(n)+A051349(n-1).

Extensions

Formula index corrected, 1119 replaced by 1159 - R. J. Mathar, Jul 27 2009

A163116 Partial sums of A161671.

Original entry on oeis.org

2, 4, 5, 6, 9, 13, 20, 27, 36, 50, 65, 84, 105, 127, 152, 181, 215, 250, 290, 333, 376, 423, 473, 528, 590, 655, 720, 788, 857, 928, 1011, 1097, 1188, 1279, 1379, 1480, 1586, 1697, 1810, 1928, 2051, 2175, 2308, 2441, 2576, 2712
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 21 2009

Keywords

Comments

The n-th partial sum of the primes minus the n-th partial sum of the nonprimes.

Examples

			a(1) = A161671(1) = 2.
a(2) = a(1) + A161671(2) = 2 + 2 = 4.
a(3) = a(2) + A161671(3) = 4 + 1 = 5.
		

Crossrefs

Formula

a(n) = A007504(n) - A051349(n-1). - R. J. Mathar, Jul 31 2009

Extensions

Corrected from a(9) on by R. J. Mathar, Jul 31 2009

A165239 Integers of the form "partial sum of the first k nonprimes divided by the k-th nonprime.".

Original entry on oeis.org

1, 8, 9, 46, 172, 1188, 4708, 28611, 480644, 785709, 1061769, 24947740, 31585866, 110275647, 149612794, 159273153, 396643326, 586740520, 622899752, 769642427, 979286966, 2603393493, 4102885015, 4313575355, 5075807081, 5890950206, 16152068952, 62853548947
Offset: 1

Views

Author

Keywords

Comments

Integers of the form A051349(k)/A018252(k), generated by k = 1, 14, 16, 88, 334, 2345, 9328, ... - R. J. Mathar, Oct 29 2011

Examples

			(1 + 4 + 6 + 8 + 9 + 10 + 12 + 14 + 15 + 16 + 18 + 20 + 21 + 22)/22 = 8.
(1 + 4 + 6 + 8 + 9 + 10 + 12 + 14 + 15 + 16 + 18 + 20 + 21 + 22 + 24 + 25)/25 = 9.
(1 + 4 + 6 + 8 + 9 + 10 + 12 + 14 + 15 + 16 + 18 + 20 + 21 + 22 + 24 + 25 + 26 + 27 + 28 + 30 + 32 + 33 + 34 + 35 + 36 + 38 + 39 + 40 + 42 + 44 + 45 + 46 + 48 + 49 + 50 + 51 + 52 + 54 + 55 + 56 + 57 + 58 + 60 + 62 + 63 + 64 + 65 + 66 + 68 + 69 + 70 + 72 + 74 + 75 + 76 + 77 + 78 + 80 + 81 + 82 + 84 + 85 + 86 + 87 + 88 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 98 + 99 + 100 + 102 + 104 + 105 + 106 + 108 + 110 + 111 + 112 + 114 + 115 + 116 + 117 + 118)/118 = 46.
		

Crossrefs

Programs

  • Mathematica
    lst={};a=0;Do[If[ !PrimeQ[n],m=n;a+=m;If[IntegerQ[a/n]&&a!=n,AppendTo[lst,a/n]]],{n,5*9!}];lst
  • PARI
    lista(kmax) = {my(s = 1); print1(1, ", "); forcomposite(k = 1, kmax, s += k; if(!(s%k), print1(s/k, ", ")));} \\ Amiram Eldar, May 24 2024

Extensions

a(11)-a(28) from Amiram Eldar, May 24 2024

A257392 Number of ways of representing n as the sum of one or more consecutive nonprime numbers (A018252).

Original entry on oeis.org

1, 2, 0, 0, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 3, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 4, 2, 1, 2, 1, 1, 1, 4, 2, 0, 1, 4, 3, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 0, 2, 4, 3, 2, 1, 3, 2, 3, 1, 2, 1, 0, 3, 4, 2, 2, 3, 3, 1, 3, 2, 1, 2, 3, 2, 2, 1, 1, 4, 2, 2, 1, 4, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 21 2015

Keywords

Examples

			a(2) = 2 because n = 2 itself is already a nonprime number (sum of 1 term), and 1 can in addition be written as A018252(1) + A018252(2), a sum of 2 consecutive nonprime numbers.
		

Crossrefs

Previous Showing 11-20 of 24 results. Next