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

A289629 Smallest positive k such that (k+1)^n + (-k)^n is divisible by a square greater than 1.

Original entry on oeis.org

3, 7, 113, 14, 3, 23, 19, 7, 1, 2, 113, 75, 3, 7, 765, 36, 3, 2476, 87, 1, 3, 165, 19, 14, 2, 7, 28, 149, 1, 2972, 151, 2, 3, 14, 113, 977, 3, 5, 19, 34, 3, 135, 113, 7, 3, 136, 335, 23, 1, 7, 113, 11, 3, 2, 19, 2, 3
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Sep 02 2017

Keywords

Comments

From Kevin P. Thompson, Dec 03 2021: (Start)
Most of the factorizations to prove known terms of this sequence have been uploaded to factordb.com.
For known terms up to n = 100, the square that divides (k+1)^n + (-k)^n is very small, less than 1500^2, with only one example greater than 1000^2.
a(20m+10) = 1 for m >= 0. With k = 1 and starting at n = 20*0 + 10 = 10, (k+1)^n + (-k)^n = 2^10 + 1 = 1024 + 1 = 1025 which is divisible by 5^2. Since the last two digits of 2^n repeat in a cycle of length 20, (k+1)^n + (-k)^n will always be divisible by 5^2 for n = 20m + 10.
Conjecture: (k+1)^n + (-k)^n is not squarefree for the following (n, k) patterns, with m >= 1: (22m-11, 2), (20m-6, 3), (20m-2, 3), (3^m, 7), (15m, 7), (20m-15, 14), (16m-8, 19), (42m-35, 23), and (8m-4, 113). In each case, the value of a(n) in this sequence is usually equal to the value specified for k, but sometimes this value is not the smallest such k. For example, in the (n, k) = (20m-2, 3) case, a(20m-2) = 3 for m = 1..3, but at m = 4, a(20*4-2) = a(78) = 1.
(End)

Examples

			a(2) = 3 because (1+1)^2 + (-1)^2 = 5 is squarefree, (2+1)^2 + (-2)^2 = 13 is squarefree, and (3+1)^2 + (-3)^2 = 25 is divisible by 5^2.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1;While[SquareFreeQ[(k+1)^n+(-k)^n],k++];k,{n,2,15}] (* Giorgos Kalogeropoulos, Dec 03 2021 *)
  • PARI
    a(n) = my(k=1); while (issquarefree((k+1)^n + (-k)^n), k++); k; \\ Michel Marcus, Dec 04 2021

Formula

a(2n+1) = A280547(2n+1).

Extensions

Offset corrected; a(16), a(32), a(36), a(44), and a(48) corrected; and a(50)-a(58) added by Kevin P. Thompson, Dec 05 2021.

A289985 Smallest positive k such that (n+1)^k + (-n)^k is divisible by a square greater than 1.

Original entry on oeis.org

10, 11, 2, 55, 21, 10, 3, 10, 33, 26, 10, 21, 10, 5, 21, 10, 55, 10, 8, 2, 2, 3, 7, 78, 55, 3, 34, 2, 21, 78, 10, 68, 10, 41, 57, 10, 55, 10, 55, 21, 10
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 02 2017

Keywords

Comments

From Robert Israel, Sep 04 2017: (Start)
If (n+1)^k + (-n)^k is divisible by p^2 then so is (m+1)^k + (-m)^k
for m == n (mod p^2), so a(m) <= k for such m.
For example, a(n) = 2 if n == 3 or 21 (mod 25).
a(24) = 78 because 25^78 + (-24)^78 is divisible by 13^2.
a(42) <= 171 because 43^171 + (-42)^171 is divisible by 19^2.
(End)

Examples

			a(1) = 10 because (1+1)^10 + (-1)^10 = 1025 is divisible by 5^2.
		

Crossrefs

Programs

  • Maple
    A289985 := proc(n)
        local k;
        for k from 1 do
            if not issqrfree((n+1)^k+(-n)^k) then
                return k;
            end if;
        end do:
    end proc:
    for n from 1 do
        printf("%d,\n",A289985(n)) ;
    end do: # R. J. Mathar, Sep 04 2017
  • Mathematica
    Table[SelectFirst[Range[10^2], ! SquareFreeQ[(n + 1)^# + (-n)^#] &], {n, 23}] (* Michael De Vlieger, Sep 03 2017 *)

Extensions

a(24)-a(41) from Giovanni Resta, Sep 04 2017

A174269 Numbers k such that exactly one of 2^k - 1 and 2^k + 1 is a prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 13, 16, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 14 2010

Keywords

Comments

Apart from the first term, all terms are primes (Mersenne exponents) or powers of two (Fermat exponents). The sequence consists of all members of A000043 and A092506, apart from 2. - Charles R Greathouse IV, Mar 20 2010
Numbers k such that one of 2^k+1 or 2^k-1 is prime, but not both. - R. J. Mathar, Mar 29 2010
The sequence "Numbers k such that 2^k + (-1)^k is a prime" gives essentially the same sequence, except with the initial 1 replaced by 2. - Thomas Ordowski, Dec 26 2016
The union of 2 and this sequence gives the values k for which 2^k or 2^k - 1 are the numbers in A006549. - Gionata Neri, Dec 19 2015
The union of 2 and this sequence is the values k for which either 2^k - 1 or 2^k + 1, or both, are prime. The reason why this only yields one additional term, 2, is because the number 3 always divides either 2^k - 1 or 2^k + 1 (also implicit in Ordowski comment). - Jeppe Stig Nielsen, Feb 19 2023

Examples

			0 is in the sequence because 2^0 - 1 = 0 is nonprime and 2^0 + 1 = 2 is prime; 2 is not in the sequence because 2^2 - 1 = 3 and 2^2 + 1 = 5 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 5000], Xor[PrimeQ[2^# - 1], PrimeQ[2^# + 1]] &] (* Michael De Vlieger, Jan 03 2016 *)
  • PARI
    isok(k) = my(p = 2^k-1, q = p+2); bitxor(isprime(p), isprime(q)); \\ Michel Marcus, Jan 03 2016

Formula

a(n) = A285929(n) for n > 2. - Jeppe Stig Nielsen, Feb 19 2023

Extensions

a(10)-a(43) from Charles R Greathouse IV, Mar 20 2010

A286348 Numbers n such that 4^n + (-3)^n is prime.

Original entry on oeis.org

0, 3, 4, 7, 16, 17, 59, 283, 311, 383, 499, 521, 541, 599, 1193, 1993, 2671, 7547, 24019, 46301, 48121, 68597, 91283, 131497, 148663, 184463, 341233
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 07 2017

Keywords

Comments

Numbers n such that (1 + k)^n + (-k)^n is prime:
0 (k = 0);
A285929 (k = 1);
A283653 (k = 2);
this sequence (k = 3);
0, 2, 3, 4, 43, 59, 191, 223, ... (k = 4);
0, 2, 5, 8, 11, 13, 16, 23, 61, 83, ...(k = 5);
0, 3, 4, 7, 16, 29, 41, 67, ... (k = 6);
0, 2, 7, 11, 16, 17, 29, 31, 79, 43, 131, 139, ... (k = 7);
0, 4, 7, 29, 31, 32, 67, ... (k = 8);
0, 2, 3, 4, 7, 11, 19, 29, ... (k = 9);
0, 3, 5, 19, 32, ... (k = 10);
0, 3, 7, 89, 101, ... (k = 11);
0, 2, 4, 17, 31, 32, 41, 47, 109, 163, ... (k = 12);
0, 3, 4, 11, 83, ... (k = 13);
0, 2, 3, 4, 16, 43, 173, 193, ... (k = 14);
0, 43, ... (k = 15);
0, 4, 5, 7, 79, ... (k = 16);
0, 2, 3, 8, 13, 71, ... (k = 17);
0, 1607, ... (k = 18);
...
Primes of the form (1 + n)^(2^n) + n: 5, 83, 65539, 7958661109946400884391941, ...
Numbers m such that (1 + k)^m + (-k)^m is not odd prime for k =< m: 0, 1, 15, 18, 53, 59, 106, 114, 124, 132, 133, 143, 177, 214, 232, 234, 240, 256, ...
Conjecture: if (1 + y)^x + (-y)^x is a prime number then x is zero, or an even power of two, or an odd prime number.

Examples

			3 is in this sequence because 4^3 + (-3)^3 = 37 is prime.
4 is in this sequence because 4^4 + (-3)^4 = 337 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..250] | IsPrime(4^n+(-3)^n)];
    
  • Mathematica
    Select[Range[0, 3000], PrimeQ[4^# + (-3)^#] &] (* Michael De Vlieger, May 09 2017 *)
  • PARI
    is(n)=ispseudoprime(4^n+(-3)^n) \\ Charles R Greathouse IV, Jun 13 2017

A286678 Smallest prime of the form (1 + k)^(2^n) + k.

Original entry on oeis.org

5, 17, 257, 65537, 795866110996400884391941, 3402823669209384634633746074317682114560000000000000000000000000000000000000000000000000000000000000039
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 12 2017

Keywords

Crossrefs

A287614 Primes of the form (1 + x)^y + (-x)^y for some positive x, y.

Original entry on oeis.org

5, 7, 13, 17, 19, 31, 37, 41, 61, 97, 113, 127, 181, 211, 257, 271, 313, 331, 337, 397, 421, 547, 613, 631, 761, 881, 919, 1013, 1201, 1301, 1657, 1741, 1801, 1861, 1951, 2113, 2269, 2381, 2437, 2521, 2791, 3121, 3169, 3571, 3613, 3697, 4219, 4447, 4513, 4651, 5101, 5167, 5419, 6211
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 27 2017

Keywords

Comments

Conjecture: If x is a positive number and (1 + x)^y + (-x)^y is an odd prime number, then y is other odd prime number or even power of two.
Smallest Mersenne prime (A000668) has n ways to write as (1 + k)^m - k^m for positive k: 3, 7, 127, ...

Examples

			5 (x = 1, y = 2), 7 (1, 3), 13 (2, 2), 17 (1, 4), 19 (2, 3), 31 (1, 5), 37 (3, 3), 41 (4, 2), 61 (3, 4 or 2, 5), 97 (2, 4), 113 (7, 2), 127 (1, 7 or 3, 6), 181 (9, 2), 211 (2, 5), 257 (1, 8), 271 (9, 3).
		

Crossrefs

Programs

  • Mathematica
    mx = 10^4; f[x_, y_] := (1+x)^y + (-x)^y; x=0; Union@ Reap[ While[ f[++x, 2] < mx, y=1; While[(v = f[x, ++y]) < mx, If[PrimeQ@ v, Sow@v]]]][[2, 1]] (* Giovanni Resta, May 31 2017 *)
Showing 1-6 of 6 results.