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

A256581 Number of conditions on m under which m^n + (m+1)^n + ... + (m+k)^n is composite for every k>=1 (see comment).

Original entry on oeis.org

2, 3, 2, 7, 5, 7, 7, 11, 5, 7, 7, 31, 23, 11, 9, 15, 17, 31, 31, 47, 23, 15, 29, 47, 23, 15, 7, 15, 11, 31, 47, 95, 47, 15, 11, 127, 95, 47, 39, 63, 71, 63, 63, 95, 47, 31, 71, 95, 71, 47, 31, 31, 47, 63, 39, 47, 23, 15, 23, 255, 191, 127, 111, 95, 71, 127
Offset: 1

Views

Author

Vladimir Shevelev, Apr 02 2015

Keywords

Comments

We consider a(n), n>=2, conditions of the form: all numbers P_i(m) are composite, i = 1, ..., a(n), where P_i(m) is a polynomial of power n+1. It could be proved that S_k(m)= m^n + (m+1)^n + ... + (m+k)^n, as a polynomial in m of degree n+1, is divisible by k+1. Let S*_k(m) = S_k(m)/(k+1). So we have
S_k(m)=S*_k(m)*(k+1)=(T_k(m)/b(n))*(k+1), (1)
where b(n)=A064538(n) and, by the definition of A064538, T_k(m) = b(n)*S*_k(m) is a polynomial with integer coefficients.
It is clear that (1) could be prime only if k+1>=2 is a divisor of b(n). In this case we should require that (1) be a composite number. We have exactly A000005(b(n))-1 such requirements. In case of n=1, a(n)=2 (see A089306, A077654).
Remark. Sometimes some considered conditions satisfy trivially. For example, both a(3)=2 conditions for every m>=2 evidently hold, such that every number of the form m^3 + (m+1)^3 + ... +(m+k)^3 is composite.
Note that essentially this method is useful only in case of even n. Indeed, according to our comment in A001017, in case of odd n>=3 the number m^n + (m+1)^n + ... + (m+k)^n is composite for every k>=1. - Vladimir Shevelev, Apr 06 2015

Crossrefs

Cf. A000005, A064538, A089306 (a(1)=2), A256385 (a(2)=3), A256546 (a(4)=7).

Formula

For n>=2, a(n) = A000005(A064538(n))-1.

Extensions

More terms from Peter J. C. Moses, Apr 02 2015

A256385 Numbers n such that 2n^2+2n+1, 3n^2+6n+5, 6n^2+30n+55 are all composite.

Original entry on oeis.org

8, 10, 11, 15, 16, 20, 26, 27, 28, 31, 33, 36, 37, 40, 41, 43, 44, 45, 46, 49, 53, 54, 55, 57, 58, 59, 61, 64, 67, 68, 71, 73, 74, 75, 77, 78, 80, 83, 88, 89, 91, 92, 93, 95, 98, 101, 103, 105, 106, 107, 108, 111, 112, 113, 114, 116, 117, 118, 120, 121, 123
Offset: 1

Views

Author

Vladimir Shevelev, Mar 31 2015

Keywords

Comments

Or numbers n such that n^2 + (n+1)^2 + ... + (n+k)^2 is composite for all k>=0.
For a generalization see comment in A256581.

Crossrefs

Programs

  • Magma
    [n: n in [0..130] | not IsPrime(2*n^2+2*n+1) and not IsPrime(3*n^2+6*n+5) and not IsPrime(6*n^2+30*n+55)]; // Vincenzo Librandi, Apr 01 2015
  • Mathematica
    Select[Range[2, 200], !PrimeQ[2 #^2 + 2 # + 1] && !PrimeQ[3 #^2 + 6 # + 5] && !PrimeQ[6 #^2 + 30 # + 55] &] (* Vincenzo Librandi, Apr 01 2015 *)
    Select[Range[200],AllTrue[{2#^2+2#+1,3#^2+6#+5,6#^2+30#+55},CompositeQ]&] (* Harvey P. Dale, Jul 15 2021 *)

Extensions

More terms from Peter J. C. Moses, Mar 31 2015

A256546 Numbers n such that n^4 + (n+1)^4 + ... + (n+k)^4 is composite for every k>=0.

Original entry on oeis.org

11, 17, 18, 22, 29, 32, 35, 39, 41, 44, 46, 49, 50, 51, 53, 55, 57, 59, 60, 61, 64, 66, 69, 70, 73, 75, 76, 77, 79, 81, 86, 92, 95, 96, 101, 102, 103, 107, 112, 113, 114, 116, 117, 118, 120, 125, 131, 133, 135, 137, 138, 141, 143, 144, 147, 148, 149, 150, 151
Offset: 1

Views

Author

Keywords

Comments

Number n is in the sequence if and only if the following seven numbers are all composite:
P_1(n) = 2n^4 + 4n^3 + 6n^2 + 4n + 1,
P_2(n) = 3n^4 + 12n^3 + 30n^2 + 36n + 17,
P_3(n) = 5n^4 + 40n^3 + 180n^2 + 400n + 354,
P_4(n) = 6n^4 + 60n^3 + 330n^2 + 900n + 979,
P_5(n) = 10n^4 + 180n^3 + 1710n^2 + 8100n + 15333,
P_6(n) = 15n^4 + 420n^3 + 6090n^2 + 44100n + 127687,
P_7(n) = 30n^4 + 1740n^3 + 51330n^2 + 756900n + 4463999.
For a generalization, see comment in A256581.

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^2] | not IsPrime(2*n^4+4*n^3+6*n^2 +4*n+1) and not IsPrime(3*n^4+12*n^3+30*n^2+36*n+17) and not IsPrime(5*n^4+40*n^3+180*n^2+400*n+354) and not IsPrime(6*n^4+60*n^3+330*n^2+900*n+979) and not IsPrime(10*n^4+ 180*n^3+1710*n^2+8100*n+15333) and not IsPrime(15*n^4+ 420*n^3+6090*n^2+44100*n+127687) and not IsPrime(30*n^4+ 1740*n^3+51330*n^2+756900*n+4463999)]; // Vincenzo Librandi, Apr 03 2015

A256461 Smallest k such that A098550(n) + A098550(n+1) + ... + A098550(n+k) is prime, or -1 if there is no such k.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 4, 1, 0, 1, 1, 1, 18, 1, 5, 0, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 9, 1, 1, 4, 1, 4, 1, 4, 0, 1, 1, 1, 1, 1, 16, 1, 0, 1, 1, 1, 7, 1, 1, 9, 1, 5, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, 7, 0, 1, 5, 1, 1, 4, 3, 1
Offset: 1

Views

Author

Vladimir Shevelev, Mar 30 2015

Keywords

Comments

Conjecture: a(n)>=0 for all n.
In contrast to this conjecture, for the sequence of the positive integers (A=A000027) there are infinitely many n for which A(n) + A(n+1) + ... + A(n+k) is composite for every k>=0 (cf. A089306, A077654).

Crossrefs

Extensions

More terms from Peter J. C. Moses, Mar 30 2015

A237053 Smallest number k such that some subset of n+1..n+k can be summed and added to n to produce a prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = 0 iff n is prime.
a(n) = 2 only for n=0; the only possible sums for k=2 are n+(n+2) = 2n+2, divisible by 2, and n+(n+1)+(n+2) = 3n+3, divisible by 3.
There are infinitely many 1's in the sequence; if p > 5 is a prime == 1 (mod 4), a((p-1)/2) = 1.
Conjecture: every nonnegative integer except 2 occurs infinitely often in the sequence.

Examples

			If n is prime, sum({n}) is prime, so we can take k = 0, whence n+1..n+0 is empty, so a(n) = 0.
6 is not prime, but 6+7 = 13 is prime, so a(6) = 1.
4 is not prime, and 4+5 is not prime, but 4+7 = 11 and 4+6+7 = 17 are prime; either of these suffices to make a(4) = 3.
		

Crossrefs

Programs

  • Maple
    b:= (n, i, t)-> isprime(n) or t>0 and
        (b(n, i+1, t-1) or b(n+i, i+1, t-1)):
    a:= proc(n) local k;
          for k from 0 while not b(n, n+1, k) do od; k
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 07 2014
  • Mathematica
    b[n_, i_, t_] := PrimeQ[n] || t > 0 && (b[n, i+1, t-1] || b[n+i, i+1, t-1]);
    a[n_] := Module[{k}, For[k = 0, !b[n, n+1, k], k++]; k];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 04 2025, after Alois P. Heinz *)

A079111 Numbers n such that 2*n+1 or n itself is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 11, 13, 14, 15, 17, 18, 19, 20, 21, 23, 26, 29, 30, 31, 33, 35, 36, 37, 39, 41, 43, 44, 47, 48, 50, 51, 53, 54, 56, 59, 61, 63, 65, 67, 68, 69, 71, 73, 74, 75, 78, 79, 81, 83, 86, 89, 90, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 111, 113, 114, 116
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 24 2002

Keywords

Comments

Union of A000040 and A005097; complement of A077654.

Programs

Formula

a(n) ~ (n log n)/2. - Charles R Greathouse IV, Jun 13 2017

A363709 For n >= 0, a(n) is the least integer i >= 0 such that n + (n + 1) + ... + (n + i) is a prime number or a(n) = -1 if no such i exists.

Original entry on oeis.org

2, 1, 0, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 0, 1, 1, -1, 0, 1, 0, 1, 1, -1, 0, -1, -1, 1, -1, -1, 0, 1, 0, -1, 1, -1, 1, 1, 0, -1, 1, -1, 0, -1, 0, 1, -1, -1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 0, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, -1, 0, 1, 1, -1, -1, 1, 0, -1
Offset: 0

Views

Author

Ctibor O. Zizka, Jun 17 2023

Keywords

Comments

Shortest arithmetic sequence with initial term n and difference 1 that sums to a prime number.
For n = 0, a(n) = 2.
For n >= 1, a(n) < 2.
For n in A053176 or A005384, a(n) = 0.
For n in A067812, a(n) = 1.
For n in A077654, a(n) = -1.

Examples

			n = 4: no such i exists, thus a(4) = -1.
n = 5: n is prime, i = 0, thus a(5) = 0.
n = 6: n + (n + 1) = 6 + 7 = 13 is prime, i = 1, thus a(6) = 1.
		

Crossrefs

Formula

((i + 1)*(i + 2*n))/2 = p, p prime number.
Showing 1-7 of 7 results.