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.

Showing 1-10 of 10 results.

A028581 Quotients associated with A024011.

Original entry on oeis.org

1, 2, 9, 15001, 10736033, 731778483019656
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={}; s=0; Do[p=Prime[n]; s=s+p; r=s/p; If[r==IntegerPart[r], AppendTo[lst, r]], {n, 1, 10^6}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 07 2008 *)

Extensions

a(5) from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 14 2000
a(6) from Paul W. Dyson, Apr 16 2022

A028582 Dividends associated with A024011.

Original entry on oeis.org

2, 10, 639, 5537154119, 4456255064711219, 40753506500253984833129731848456
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

a(5) from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 14 2000
a(6) from Paul W. Dyson, Apr 16 2022

A007506 Primes p with property that p divides the sum of all primes <= p.

Original entry on oeis.org

2, 5, 71, 369119, 415074643, 55691042365834801
Offset: 1

Views

Author

Keywords

Comments

a(6) > 29505444491. - Jud McCranie, Jul 08 2000
a(6) > 10^12. - Jon E. Schoenfield, Sep 11 2008
a(6), if it exists, is larger than 10^14. - Giovanni Resta, Jan 09 2014
Also primes p with property that p divides 1 plus the sum of all composites < p. - Vicente Izquierdo Gomez, Aug 05 2014
a(7) > 253814097223614463, - Paul W. Dyson, Sep 27 2022

Examples

			2 divides 2;
5 divides 2 + 3 + 5;
71 divides 2 + 3 + 5 + 7 + ... + 61 + 67 + 71; etc.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 71, p. 25, Ellipses, Paris 2008.
  • Harry L. Nelson, Prime Sums, J. Rec. Math., 14 (1981), 205-206.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 129.

Crossrefs

Programs

  • Mathematica
    sumOfPrimes = 0; Do[ sumOfPrimes += p;  If[ Divisible[ sumOfPrimes, p], Print[p]], {p, Prime /@ Range[23000000]}]  (* Jean-François Alcover, Oct 22 2012 *)
    Transpose[Module[{nn=23000000,pr},pr=Prime[Range[nn]];Select[Thread[ {Accumulate[ pr], pr}], Divisible[#[[1]],#[[2]]]&]]][[2]] (* Harvey P. Dale, Feb 09 2013 *)
  • PARI
    s=0;forprime(p=2,1e9,s+=p;if(s%p==0,print1(p", "))) \\ Charles R Greathouse IV, Jul 22 2013

Extensions

Example corrected by Harvey P. Dale, Feb 09 2013
a(6) from Paul W. Dyson, Apr 16 2022

A071089 Remainder when sum of first n primes is divided by n-th prime.

Original entry on oeis.org

0, 2, 0, 3, 6, 2, 7, 1, 8, 13, 5, 12, 33, 23, 46, 10, 27, 13, 32, 0, 55, 1, 44, 73, 90, 50, 28, 87, 63, 11, 69, 17, 70, 42, 41, 11, 72, 139, 75, 146, 44, 8, 9, 164, 88, 48, 7, 201, 121, 79, 224, 92, 46, 57, 170, 26, 145, 95, 216, 112, 58, 71, 293, 185, 129, 13, 255, 81, 128
Offset: 1

Views

Author

Randy L. Ekl, May 26 2002

Keywords

Comments

Conjecture: Every nonnegative integer can appear in the sequence at most finitely many times. - Thomas Ordowski, Jul 22 2013
I conjecture the opposite. Heuristically a given number should appear log log x times below x. - Charles R Greathouse IV, Jul 22 2013
In the first 10000 terms, one sees a(n) = n for n=2,7,12. Does this ever happen again? - J. M. Bergot, Mar 26 2018
Yes, it happens for n = 83408, too. - Michel Marcus, Mar 27 2018

Examples

			a[5] = 6 because s[5] = 2+3+5+7+11 = 28, p[5]=11 and q[5]= floor(28/11)=2, so a[5] = 28-11*2 = 6.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);
    a:=List([1..70],i->Sum(P{[1..i]}) mod P[i]); # Muniru A Asiru, Mar 27 2018
  • Maple
    s:= proc(n) option remember; `if`(n=0, 0, ithprime(n)+s(n-1)) end:
    a:= n-> irem(s(n), ithprime(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 27 2018
  • Mathematica
    f[n_] := Mod[ Sum[ Prime[i], {i, 1, n - 1}], Prime[n]]; Table[ f[n], {n, 1, 70}] or
    a[1] = 0; a[n_] := Block[{s = Sum[Prime[i], {i, 1, n}]}, s - Prime[n]*Floor[s/Prime[n]]]; Table[ f[n], {n, 1, 70}]
    f[n_] := Mod[Plus @@ Prime@ Range@ n, Prime@ n]; Array[f, 70] (* Robert G. Wilson v, Nov 12 2016 *)
    Module[{nn=70,t},t=Accumulate[Prime[Range[nn]]];Mod[#[[1]],#[[2]]]&/@ Thread[ {t,Prime[Range[nn]]}]] (* Harvey P. Dale, Sep 19 2019 *)
  • PARI
    for(n=1,100,s=sum(i=1,n, prime(i)); print1(s-prime(n)*floor(s/prime(n)),","))
    
  • PARI
    a(n) = vecsum(primes(n)) % prime(n); \\ Michel Marcus, Mar 27 2018
    

Formula

a(n) = s[n] - p[n]*q[n], where s[n] = sum of first n primes, p[n] is n-th prime and q[n] is floor(s[n]/p[n]).
a(A024011(n)) = 0. - Michel Marcus, Jan 22 2015

Extensions

Edited by Robert G. Wilson v and Benoit Cloitre, May 30 2002

A274649 a(n) is the smallest odd prime that divides n + the sum of all smaller primes, or 0 if no such prime exists.

Original entry on oeis.org

5, 3, 30915397, 11339869, 3, 5, 859, 3, 41, 233, 3, 7, 4175194313, 3, 307, 5, 3, 1459, 7, 3, 5, 9907, 3, 647, 13, 3, 31, 11, 3, 193, 5, 3, 7, 2939, 3, 5, 3167, 3, 11, 7, 3, 1321, 86629, 3, 17, 5, 3
Offset: 0

Views

Author

Neil Fernandez, Nov 10 2016

Keywords

Comments

From David A. Corneth, Nov 12 2016: (Start)
a(n) is the smallest odd prime p such that p|(n + A007504(primepi(p) - 1)) or zero if no such p exists.
If a(n) = p then a(n + p) <= p. (End)
If n is congruent to 1 (mod 3), then a(n)=3.
a(2), a(3) and a(12) were found by Jack Brennen.
From Robert G. Wilson v, Nov 13 2016: (Start)
If n == 1 (mod 3) then a(n) = 3;
If n == 0 (mod 5) then a(n) = 5;
If n == 4 (mod 7) then a(n) = 7;
if n == 5 (mod 11) then a(n) = 11;
if n == 11 (mod 13) then a(n) = 13;
if n == 10 (mod 17) then a(n) = 17;
if n == 18 (mod 19) then a(n) = 19;
if n == 23 (mod 23) then a(n) = 23;
in that order, i.e., from smallest to greatest prime modulus, etc.
First occurrence of p > 2: 1, 0, 11, 27, 24, 44, 56, 84, 161, ..., .
a(47) > 10^11. (End)

Examples

			a(6) = 859 because 859 is the smallest odd prime that divides the sum of 6 + (sum of all primes smaller than itself).
a(8) = 41 because 8+2+3+5+7+11+13+17+19+23+29+31+37+41 = 246 and 246/41 = 6.
		

Crossrefs

Cf. A016777 (n==1 (mod 3))

Programs

  • Mathematica
    f[n_] := Block[{p = 3, s = n +2}, While[ Mod[s, p] != 0, s = s + p; p = NextPrime@ p]; p]; Array[f, 47, 0] (* Robert G. Wilson v, Nov 12 2016 *)
  • Python
    # see link for an alternate that searches in parallel to a limit
    from sympy import nextprime
    def a(n):
      psum, p = 2, 3
      while (n + psum)%p: psum, p = psum + p, nextprime(p)
      return p
    for n in range(12):
      print(a(n), end=", ") # Michael S. Branicky, May 03 2021

A330579 Numbers k such that the k-th composite number divides the sum of the first k composite numbers.

Original entry on oeis.org

1, 4, 493, 1565, 6210, 26375, 64019, 289862, 870828, 1244485, 3313113, 4300012, 7946206, 1447234860, 4147639664, 7190149312, 23828369695, 39710847388, 494027033160, 982853084580, 1095174951021, 1141650682059, 1522735118076, 1642938906044
Offset: 1

Views

Author

Rémy Sigrist, Dec 18 2019

Keywords

Comments

This sequence corresponds to the positions of zeros in A330578.

Examples

			The first 4 composite numbers are: 4, 6, 8 and 9.
As 4 + 6 + 8 + 9 = 3*9, 4 belongs to the sequence.
		

Crossrefs

Cf. A024011 (prime variant), A330578, A330580.

Programs

  • PARI
    s=0; k=0; forcomposite (c=4, oo, k++; s+=c; if (s%c==0, print1 (k", ")))

Extensions

a(15)-a(24) from Giovanni Resta, Dec 20 2019

A249679 Terms of A007504 divisible by 3.

Original entry on oeis.org

0, 129, 381, 501, 639, 963, 1161, 1371, 1593, 1851, 2127, 2427, 3087, 3447, 3831, 4227, 5589, 6081, 6870, 10191, 10887, 12339, 13101, 13887, 14697, 15537, 16401, 17283, 18189, 19113, 22548, 23592, 25800, 26940, 28104, 30504, 31734, 35568, 36888, 38238, 39612, 41022, 42468, 46191
Offset: 1

Views

Author

Zak Seidov, Nov 03 2014

Keywords

Comments

Conjecture: a(n) ~ 4.5 n^2 log n. - Charles R Greathouse IV, Nov 03 2014

Examples

			a(2) = 129 = A007504(10), a(3) = 381 = A007504(16).
		

Crossrefs

Intersection of A007504 and A008585. Cf. A007504, A008585, A024011, A045345, A128165, A189072.

Programs

A302567 a(n) is the number of primes less than the n-th prime that divide the sum of primes up to the n-th prime.

Original entry on oeis.org

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

Views

Author

G. L. Honaker, Jr., Apr 11 2018

Keywords

Comments

This sequence differs from A105783 only at n = 1, 3, 20, 31464, 22096548, ... (the terms of A024011); see Example section. - Jon E. Schoenfield, Apr 11 2018

Examples

			a(13)=3 because the 13th prime is 41 and the sum of primes up to 41 is 238, which has 3 distinct prime factors less than 41.
a(20)=1 because the 20th prime is 71 and the sum of primes up to 71 is 639 = 7*71, which has only 1 distinct prime factor less than 71. - _Jon E. Schoenfield_, Apr 11 2018
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    a:= n-> nops(select(x-> x < ithprime(n), numtheory[factorset](s(n)))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 11 2018
  • Mathematica
    a[n_] := (S = Total[P = Prime[Range[n]]]; Count[P, p_ /; Divisible[S, p]]);
    Array[a, 100] (* Jean-François Alcover, Apr 30 2019 *)
  • PARI
    a(n) = #select(x->(x < prime(n)), factor(sum(k=1, n, prime(k)))[,1]); \\ Michel Marcus, Apr 11 2018

Formula

a(n) = A105783(n) - 1 if n is in A024011; otherwise, a(n) = A105783(n). - Jon E. Schoenfield, Apr 11 2018

A328264 a(n) is the least prime p such that prime(n) divides the sum of n consecutive primes starting with p.

Original entry on oeis.org

2, 5, 2, 37, 83, 17, 7, 23, 13, 67, 163, 821, 227, 7, 13, 151, 599, 643, 271, 2, 83, 19, 83, 1069, 61, 37, 823, 263, 23, 857, 89, 1931, 139, 181, 71, 239, 1861, 739, 487, 37, 1237, 3833, 37, 6961, 1709, 499, 587, 271, 2687, 359, 5, 727, 73, 491, 73, 41, 3989, 797, 2083, 1451, 199, 349, 2027, 2441
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 09 2019

Keywords

Comments

a(n)=3 for n=850 and 55154 (and presumably infinitely many others).

Examples

			a(4)=37 because prime(4)=7 divides the sum of 4 consecutive primes starting with 37 (37+41+43+47=168), but does not divide any earlier sum of 4 consecutive primes.
		

Crossrefs

Cf. A024011 (a(n)=2).

Programs

  • Maple
    P:= [0,seq(ithprime(i),i=1..100000)]:
    S:= ListTools:-PartialSums(P):
    f:= proc(n) local p,k;
      p:= ithprime(n);
      for k from 1 to nops(S)-n do
          if S[k+n]-S[k] mod p = 0 then
          return P[k+1]
          fi
        od;
      FAIL
    end proc:
    map(f, [$1..200]);
  • Mathematica
    a[n_] := Block[{m=Prime@n, s=Sum[Prime@i, {i, n}], p=2, q}, q=m; While[Mod[s, m] > 0, s-=p; {p, q} = NextPrime@{p, q}; s+=q]; p]; Array[a, 70] (* Giovanni Resta, Oct 10 2019 *)

A130825 A list of pairs of consecutive primes identified by the first in the pair. A number can be found between these two primes that divides the sum of all primes up to this prime.

Original entry on oeis.org

23, 31, 2741, 10613, 63199, 85853, 1039153, 2285291, 52962017, 66998857, 315796799, 336125837, 834972769, 1309750063, 1617454199, 2056836121, 5455816469, 9030058187, 10622144453, 237371071699, 341296396619
Offset: 1

Views

Author

J. M. Bergot, Aug 20 2007

Keywords

Comments

Both A045345 and A024011 are very restrictive in creating a sequence. The sequence herein presented has a bit more flexibility to produce qualifying divisors of the subtotal of the sum of all primes.

Examples

			The subtotal for the primes up to 23 is 100. Between 23 and the next prime 29 there are the composites 24, 25, 26, 27 and 28 that are candidates for evenly dividing this subtotal of 100. We have 25 within this group and it does divide that subtotal of 100. Moving on to the subtotal up to 31, which is 160, we have the interval of composites 32, 33, 34, 35 and 36 as possible divisors of this current subtotal of 160. The number 32 divides this subtotal.
		

Crossrefs

Formula

Move through the subtotals of all the primes, 2+3+5+7+11+..., until a composite between two consecutive primes divides the subtotal of all previous primes. If it does, then that prime immediately preceding the interval of composites is listed in the sequence.

Extensions

a(8)-a(21) from Donovan Johnson, Jul 11 2011
Showing 1-10 of 10 results.