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-2 of 2 results.

A117504 Prime at which the cumulative sum in A117503 is prime.

Original entry on oeis.org

37, 137, 151, 173, 409, 467, 503, 677, 937, 1091, 1153, 1229, 1303, 1409, 1453, 1471, 1531, 2137, 2221, 2251, 2393, 2503, 2593, 2633, 2671, 2797, 2837, 3001, 3023, 3089, 3163
Offset: 1

Views

Author

Enoch Haga, Mar 25 2006

Keywords

Examples

			In a(1)=37, the cumulative sum of primes 1-12 in A117503 has risen to 613, a prime -- 37 being the 12th prime to be multiplied by Pi, with integer of result added to previous results.
		

Crossrefs

Cf. A117503.

Programs

  • Maple
    Digits := 30 ; A117504 := proc(nmax) local a,pisum,p ; a := [] ; pisum := 0 ; p :=1 ; while nops(a) <=nmax do while true do pisum := pisum+floor(Pi*ithprime(p)) ; p := p+1 ; if isprime(pisum) then a := [op(a),ithprime(p-1)] ; break ; fi ; od : od : RETURN(a) ; end: a := A117504(30) ; # R. J. Mathar
  • Mathematica
    Prime[#]&/@Flatten[Position[Accumulate[Table[Floor[Pi p],{p,Prime[Range[500]]}]],?PrimeQ]] (* _Harvey P. Dale, Jul 19 2023 *)
  • UBASIC
    10 Ct=1
    20 B=nxtprm(B)
    30 C=int(pi(B))
    40 D=D+C
    41 print Ct,B,C,D
    50 if D=prmdiv(D) then print D:stop
    55 Ct=Ct+1
    60 goto 20

Formula

Multiply consecutive primes by Pi, truncate to integer, sum until a prime sum is reached.

Extensions

Corrected by R. J. Mathar, Oct 26 2006

A117527 Cumulative sums of int(prime*e) which are primes.

Original entry on oeis.org

5, 13, 109, 641, 757, 4007, 5387, 7901, 9349, 11467, 23297, 33503, 42193, 57139, 76343, 100213, 209597, 252583, 261631, 373621, 424231, 432287, 503593, 507961, 618593, 699427, 791489, 825389, 895243, 943837, 1212917, 1455901, 1573577
Offset: 1

Views

Author

Enoch Haga, Mar 25 2006

Keywords

Comments

Sometimes prime integer sums occur with consecutive primes, as 1601*e and 1607*e.

Examples

			The 4th cumulative sum of integer products is 641, prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Floor[E*Prime[Range[500]]]],PrimeQ] (* Harvey P. Dale, Mar 27 2025 *)
  • UBASIC
    10 Ct=1
    20 B=nxtprm(B)
    22 E=#e
    30 C=int(B*E)
    40 D=D+C
    41 print Ct,B,C,D
    50 if D=prmdiv(D) then print D:stop
    55 Ct=Ct+1
    60 goto 20

Formula

Beginning with the first prime, multiply by e, take integer, repeat, adding integer sums until a cumulative prime sum occurs. On the first prime, 2, the integer product is 5, prime. Continue to next integer product, add, until the next prime sum, 13.
Showing 1-2 of 2 results.