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.

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