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

A053789 a(n) = A020639(A053790(n)).

Original entry on oeis.org

2, 2, 2, 7, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 41, 2, 3, 2, 3, 2, 3, 2, 3, 2, 59, 2, 7, 2, 3, 2, 3, 2, 7, 2, 37, 2, 2, 5, 2, 2, 89, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 13, 2, 109, 2, 2, 17, 2, 2, 2, 7, 2, 7, 2, 2, 7, 2
Offset: 1

Views

Author

Enoch Haga, Mar 27 2000

Keywords

Examples

			a(4) = 7 because the sum of the first 8 primes is 77 and 7 is its least prime divisor.
		

Crossrefs

Programs

  • Maple
    N:= 2000: # to use primes <= N
    P:= select(isprime, [2, seq(i, i=3..N, 2)]):
    A053790:= remove(isprime, ListTools:-PartialSums(P)):
    map(t -> min(numtheory:-factorset(t)), A053790); # Robert Israel, Jan 29 2018

Extensions

Edited by N. J. A. Sloane, Mar 16 2008, following explication by R. J. Mathar, Feb 26 2008

A066527 Triangular numbers that for some k are also the sum of the first k primes.

Original entry on oeis.org

10, 28, 133386, 4218060, 54047322253, 14756071005948636, 600605016143706003, 41181981873797476176, 240580227206205322973571, 1350027226921161196478736
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 06 2002

Keywords

Comments

a(n) = A000217(i) = A007504(j) for appropriate i, j.
These are the 4, 7, 516, 2904, 328777, ... -th triangular numbers and are the sums of the first 3, 5, 217, 1065, 93448, ... prime numbers respectively.
a(7) is the sum of the first 240439822 primes. a(8) is the sum of the first 1894541497 primes. - Donovan Johnson, Nov 24 2008
a(9) is the sum of the first 132563927578 primes. a(10) is the sum of the first 309101198255 primes. a(11) > 6640510710493148698166596 (sum of first pi(2*10^13) primes). - Donovan Johnson, Aug 23 2010

Examples

			a(2) = 28, as A000217(7) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 = 2 + 3 + 5 + 7 + 11 = A007504(5).
		

Crossrefs

Intersection of A000217 and A007504.
Cf. also A061890, A364691, A366269.

Programs

  • Haskell
    a066527 n = a066527_list !! (n-1)
    a066527_list = filter ((== 1) . a010054) a007504_list
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Maple
    a066527(m) = local(d,ds,p,ps); d=1; ds=1; p=2; ps=2; while(ds
    				
  • Mathematica
    s = 0; Do[s = s + Prime[n]; t = Floor[ Sqrt[2*s]]; If[t*(t + 1) == 2s, Print[s]], {n, 1, 10^6} ]
    Select[Accumulate[Prime[Range[5000000]]],IntegerQ[(Sqrt[1+8#]-1)/2]&] (* Harvey P. Dale, May 04 2013 *)
  • Python
    from sympy import integer_nthroot, isprime, nextprime
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def afind(limit):
        s, p = 2, 2
        while s < limit:
            if istri(s): print(s, end=", ")
            p = nextprime(p)
            s += p
    afind(10**11) # Michael S. Branicky, Oct 28 2021

Extensions

a(5) from Klaus Brockhaus and Robert G. Wilson v, Jan 07 2002
a(6) from Philip Sung (philip_sung(AT)hotmail.com), Jan 25 2002
a(7)-a(8) from Donovan Johnson, Nov 24 2008
a(9)-a(10) from Donovan Johnson, Aug 23 2010

A338446 Numbers that are sums of consecutive odd primes.

Original entry on oeis.org

3, 5, 7, 8, 11, 12, 13, 15, 17, 18, 19, 23, 24, 26, 29, 30, 31, 36, 37, 39, 41, 42, 43, 47, 48, 49, 52, 53, 56, 59, 60, 61, 67, 68, 71, 72, 73, 75, 78, 79, 83, 84, 88, 89, 90, 95, 97, 98, 100, 101, 102, 103, 107, 109, 112, 113, 119, 120, 121, 124, 127, 128, 131, 132, 137
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 28 2020

Keywords

Examples

			67 is in the sequence because 67 = 7 + 11 + 13 + 17 + 19.
		

Crossrefs

Programs

  • Maple
    q:= proc(n) local p, q, s; p, q, s:= prevprime(n+1)$3;
          do if p=2 then return false
           elif s=n then return true
           elif sAlois P. Heinz, Oct 31 2020
  • Mathematica
    okQ[n_] := Module[{p, q, s}, {p, q, s} = Table[NextPrime[n + 1, -1], {3}]; While[True, Which[
         p == 2, Return@ False,
         s == n, Return@ True,
         s < n, p = NextPrime[p, -1]; s = s + p,
         True, s = s - q; q = NextPrime[q, -1]]]];
    Select[Range[3, 150], okQ] (* Jean-François Alcover, Feb 21 2022, after Alois P. Heinz *)
  • Python
    from sympy import prevprime
    def ok(n):
        if n < 2: return False
        p, q, s = [prevprime(n+1)] * 3
        while True:
            if p == 2: return False
            if s == n: return True
            elif s < n: p = prevprime(p); s += p
            else: s -= q; q = prevprime(q)
    print([k for k in range(150) if ok(k)]) # Michael S. Branicky, Feb 21 2022 after Alois P. Heinz
Showing 1-3 of 3 results.