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

A360311 The sum of the primes prime(n) + prime(n+1) + ... + prime(n+k) in A360297.

Original entry on oeis.org

5, 26, 124, 318, 1703, 1133, 2086, 7641, 10912775, 60927, 8764, 184252585101, 144329, 474, 1090
Offset: 1

Views

Author

Scott R. Shannon, Feb 03 2023

Keywords

Comments

See A360297 for further details.

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360311(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p+q, 1
        while s%(q:=nextprime(q)):
            k += 1
            s += q
        return s # Chai Wah Wu, Feb 06 2023

A360312 The dividing prime prime(n+k+1) in A360297.

Original entry on oeis.org

5, 13, 31, 53, 131, 103, 149, 283, 14081, 883, 313, 2281229, 1429, 79, 109
Offset: 1

Views

Author

Scott R. Shannon, Feb 03 2023

Keywords

Comments

See A360297 for further details.

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360312(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p+q, 1
        while s%(q:=nextprime(q)):
            k += 1
            s += q
        return q # Chai Wah Wu, Feb 06 2023

A360376 a(n) = minimal nonnegative k such that prime(n) * prime(n+1) * ... * prime(n+k) + 1 is divisible by prime(n+k+1), or -1 if no such k exists.

Original entry on oeis.org

0, 99, 14, 1, 2, 73, 33, 10, 137, 277856, 1
Offset: 1

Views

Author

Scott R. Shannon, Feb 04 2023

Keywords

Comments

Assuming a(12) exists it is greater than 2.25 million.

Examples

			a(1) = 0 as prime(1) + 1 = 2 + 1 = 3, which is divisible by prime(2) = 3.
a(3) = 14 as prime(3) * ... * prime(17) + 1 = 320460058359035439846, which is divisible by prime(18) = 61.
a(10) = 277856 as prime(10) * ... * prime(277866) + 1 = 645399...451368 (a number with 1701172 digits), which is divisible by prime(277867) = 3919259.
a(11) = 1 as prime(11) * prime(12) + 1 = 31 * 37 + 1 = 1148, which is divisible by prime(13) = 41.
		

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360376(n):
        p = prime(n)
        s, k = p, 0
        while (s+1)%(p:=nextprime(p)):
            k += 1
            s *= p
        return k # Chai Wah Wu, Feb 07 2023

A360406 a(n) = minimal positive k such that prime(n) * prime(n+1) * ... * prime(n+k) - 1 is divisible by prime(n+k+1), or -1 if no such k exists.

Original entry on oeis.org

1, 1, 9, 14, 31, 826, 1, 34
Offset: 1

Views

Author

Scott R. Shannon, Feb 06 2023

Keywords

Comments

Assuming a(9) exists it is greater than 1.75 million.
a(11) = 692, a(12) = 8, a(13) = 792. - Robert Israel, Feb 22 2023

Examples

			a(1) = 1 as prime(1) * prime(2) - 1 = 2 * 3 - 1 = 5, which is divisible by prime(3) = 5.
a(2) = 1 as prime(2) * prime(3) - 1 = 3 * 5 - 1 = 14, which is divisible by prime(4) = 7.
a(3) = 9 as prime(3) * ... * prime(12) - 1 = 1236789689134, which is divisible by prime(13) = 41.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local P,k,p;
    P:= ithprime(n); p:= nextprime(P);
    for k from 0 to 10^6 do
      if P-1 mod p = 0 then return k fi;
      p:= nextprime(p);
     od;
    FAIL
    end proc:
    map(f, [$1..8]); # Robert Israel, Feb 22 2023
  • Python
    from sympy import prime, nextprime
    def A360406(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p*q, 1
        while (s-1)%(q:=nextprime(q)):
            k += 1
            s *= q
        return k # Chai Wah Wu, Feb 06 2023
Showing 1-4 of 4 results.