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.

Previous Showing 21-23 of 23 results.

A255866 Least m > 0 such that gcd(m^n+16, (m+1)^n+16) > 1, or 0 if there is no such m.

Original entry on oeis.org

1, 0, 2, 22, 128, 12, 2, 81, 1, 5982, 2, 11417025, 32768, 70471611388086, 2, 26, 1, 1019, 2, 12168420936538713481747, 48, 128, 2, 788, 1, 131711329, 2, 91, 13, 2920553219286322570768516629247, 2, 237, 1, 22, 2, 108, 27, 9404578, 2, 2859801, 1, 41772125, 2
Offset: 0

Views

Author

M. F. Hasler, Mar 09 2015

Keywords

Comments

See A118119, which is the main entry for this class of sequences.

Examples

			For n=0, gcd(m^0+16, (m+1)^0+16) = gcd(16, 16) = 16, therefore a(0)=1, the smallest possible (positive) m-value.
For n=1, gcd(m^n+16, (m+1)^n+16) = gcd(m+15, m+16) = 1, therefore a(1)=0.
For n=2, see formula with k=0.
For n=3, gcd(22^3+16, 23^3+16) = 31 and (m, m+1) = (22, 23) is the smallest pair which yields a GCD > 1 here.
		

Crossrefs

Programs

  • Mathematica
    A255866[n_] := Module[{m = 1}, While[GCD[m^n + 16, (m + 1)^n + 16] <= 1, m++]; m]; Join[{1, 0}, Table[A255866[n], {n, 2, 10}]] (* Robert Price, Oct 16 2018 *)
  • PARI
    a(n,c=16,L=10^7,S=1)={n!=1 && for(a=S,L,gcd(a^n+c,(a+1)^n+c)>1 && return(a))}

Formula

a(4k+2) = 2 for k>=0, because 2^(4k+2) = 4^(2k+1), 3^(4k+2) = 9^(2k+1), and 4 = 9 = -1 (mod 5), therefore gcd(2^(4k+2)+16, 3^(4k+2)+16) >= 5.

Extensions

a(11)-a(42) from Max Alekseyev, Aug 06 2015

A255867 Least m > 0 such that gcd(m^n+17, (m+1)^n+17) > 1, or 0 if there is no such m.

Original entry on oeis.org

1, 0, 1, 1925, 1, 189812175, 1, 2, 1, 116, 1, 55508752881180794569675021, 1, 337276, 1, 230, 1, 162, 1, 2628, 1, 15, 1, 3604979675443168377172749, 1, 53, 1, 248, 1, 254, 1, 5998484614, 1, 1323, 1, 2, 1, 42750021, 1, 51, 1, 17870, 1, 108, 1, 87, 1, 8274, 1, 2, 1, 35, 1, 4049, 1, 308, 1, 8885, 1, 2805086, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 09 2015

Keywords

Comments

See A118119, which is the main entry for this class of sequences.

Examples

			For n=0, gcd(m^0+17, (m+1)^0+17) = gcd(18, 18) = 18, therefore a(0)=1, the smallest possible (positive) m-value.
For n=1, gcd(m^n+17, (m+1)^n+17) = gcd(m+17, m+18) = 1, therefore a(1)=0.
For n=2, see formula with k=0.
For n=3, gcd(1925^3+17, 1926^3+17) = 1951 and (m, m+1) = (1925, 1926) is the smallest pair which yields a GCD > 1 here.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local q1, q2, r, m, bestm,p,A;
      q1:= m^n + 17;
      q2:= (m+1)^n + 17;
      r:= resultant(q1,q2, m);
      bestm:= infinity;
      for p in numtheory:-factorset(r) do
        A:= [msolve(q1, p)];
        A:= select(s -> eval(q2, s) mod p = 0, A);
        bestm:= min(bestm, op(map(s -> subs(s,m), A)));
      od;
      if bestm = infinity then -1 else bestm fi
    end proc:
    f(0):= 1: f(1):=0:
    map(f, [$1..26]); # Robert Israel, May 31 2019
  • Mathematica
    A255867[n_] := Module[{m = 1}, While[GCD[m^n + 17, (m + 1)^n + 17] <= 1, m++]; m]; Join[{1, 0}, Table[A255867[n], {n, 2, 10}]] (* Robert Price, Oct 16 2018 *)
  • PARI
    a(n,c=17,L=10^7,S=1)={n!=1 && for(a=S,L,gcd(a^n+c,(a+1)^n+c)>1 && return(a))}
    
  • Python
    from sympy import primefactors, resultant, nthroot_mod
    from sympy.abc import m
    def A255867(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(m**n+17,(m+1)**n+17)):
            for d in (a for a in nthroot_mod(-17,n,p,all_roots=True) if pow(a+1,n,p)==-17%p):
                k = min(d,k) if k else d
        return k  # Chai Wah Wu, May 07 2024

Formula

a(2k) = 1 for k>=0, because gcd(1^(2k)+17, 2^(2k)+17) = gcd(18, 4^k-1) >= 3 since 4 = 1 (mod 3).

Extensions

a(5)-a(22) from Hiroaki Yamanouchi, Mar 12 2015
a(23)-a(60) from Max Alekseyev, Aug 06 2015

A255831 Square array A(m,n) = Resultant(X^m+n,(X+1)^m+n), read by (falling) antidiagonals, m >= 1, n >= 0.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 9, 28, 1, 1, 13, 109, 153, 1, 1, 17, 244, 1617, 3751, 1, 1, 21, 433, 5929, 52501, 175760, 1, 1, 25, 676, 14625, 258751, 3261249, 6835648, 1, 1, 29, 973, 29241, 810001, 19763200, 148756357, 1051779953, 1, 1, 33, 1324, 51313, 1968751, 73559825, 1086478912, 23937893793, 364668913756, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 17 2015

Keywords

Comments

This polynomial resultant gives the period for solutions to the equations A255852 - A255869. For example, A010034(n) = A255859(17) + A(17,9)*(n-1). In general, there may be more than one starting solutions (cf. A118119).

Examples

			The square array starts at its upper left as follows:
[ 1      1       1        1        1         1         1 ... ]
[ 1      5       9       13       17        21        25 ... ]
[ 1     28     109      244      433       676       973 ... ]
[ 1    153    1617     5929    14625     29241     51313 ... ]
[ 1   3751   52501   258751   810001   1968751   4072501 ... ]
[ 1 175760 3261249 19763200 73559825 207499536 488999665 ... ]
[ :     :       :        :        :         :         :  ·.  ]
[ :     :       :        :        :         :         :    ·.]
		

Programs

  • PARI
    A255831(m,n)=polresultant('x^m+n,('x+1)^m+n)
    
  • Python
    from sympy import resultant
    from sympy.abc import x
    def A255831_T(m,n): return resultant(x**m+n,(x+1)**m+n) # Chai Wah Wu, May 08 2024

Extensions

Edited by Max Alekseyev, Aug 07 2015
Previous Showing 21-23 of 23 results.