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-10 of 23 results. Next

A186713 For the starting base k = A118119(n), a(n) is the largest value q such that gcd(k^n+1, (k+1)^n+1, ..., (k+q)^n+1) > 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 2

Views

Author

Michel Lagneau, Feb 26 2011

Keywords

Examples

			a(2) = 1 because 2^2+1 = 5 and 3^2+1 = 2*5 => gcd(..) = 5 and q = 1;
a(53) = 3 because
5^53 + 1 = 2 * 3 * 107 * 28838378869 * 599659003321309822423087;
6^53 + 1 = 7 * 107 * 97351567 * 33685364386033 * 71080464397105403;
7^53 + 1 = 2^3 * 107 * 345449549 * 35416476134069*58902316970027001503;
8^53 + 1 = 3^2 * 107 * 6043 * 28059810762433 * 4475130366518102084427698737 => gcd(..) = 107 and q=3.
		

Crossrefs

Programs

  • Maple
    A186713 := proc(n) local k ,g,q; k := A118119(n) ; for q from 1 do g := igcd(seq((k+i)^n+1,i=0..q)) ; if g=1 then return q-1 ; end if; end do: end proc: # R. J. Mathar, Mar 07 2011

Extensions

a(55), a(56) corrected by R. J. Mathar, Mar 07 2011

A255852 Least k > 0 such that gcd(k^n+2, (k+1)^n+2) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 1, 51, 1, 40333, 1, 434, 1, 16, 1, 1234, 1, 78607, 1, 8310, 1, 817172, 1, 473, 1, 116, 1, 22650, 1, 736546059, 1, 22, 1, 1080982, 1, 252, 1, 7809, 1, 644, 1, 1786225573, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

See A118119, which is the main entry for this class of sequences.
a(39) <= 8105110304875691067. - Max Alekseyev, Aug 06 2015
a(41) = 34290868, a(49) <= 2002111070, a(47) = 32286649814088452353414982038778088771611290478685407234712300075870593693164721\
99455164873287615636327176797646292254029648497024652505965417768073756378034012\
80883965289152013363422286845290874810700297549641281106223286199677401563701715\
56997846264124867393209579875386439424082082891813462700417531719383529314983727. - Hiroaki Yamanouchi, Mar 10 2015
a(43) = 3585, a(45) = 5, a(51) = 16, a(57) = 22, a(59) = 4495, a(63) = 1291, a(65) = 108, a(67) = 220, a(69) = 218039, a(71) = 2112. - Chai Wah Wu, May 08 2024

Examples

			For n=1, gcd(k^n+2,(k+1)^n+2) = gcd(k+2,k+3) = 1, therefore a(1)=0.
For n=2k, see formula.
For n=3, we have gcd(51^3+2,52^3+2) = 109, and the pair (k,k+1)=(51,52) is the smallest which yields a GCD > 1, therefore a(3)=51.
		

Crossrefs

Programs

  • Mathematica
    A255852[n_] := Module[{m = 1}, While[GCD[m^n + 2, (m + 1)^n + 2] <= 1, m++]; m];
    Join[{1, 0}, Table[A255852[n], {n, 2, 24}]]
  • PARI
    a(n, c=2, 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 x
    def A255852(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+2,(x+1)**n+2)):
            for d in (a for a in sorted(nthroot_mod(-2,n,p,all_roots=True)) if pow(a+1,n,p)==-2%p):
                k = min(d,k) if k else d
                break
        return k # Chai Wah Wu, May 08 2024

Formula

a(2k)=1 for k>=0, because gcd(1^(2k)+2,2^(2k)+2) = gcd(3,4^k-1) = 3.
a(2k+1) = A255832(k).

Extensions

a(25),a(37),a(41),a(47) conjectured by Hiroaki Yamanouchi, Mar 10 2015; confirmed by Max Alekseyev, Aug 06 2015

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

Original entry on oeis.org

1, 0, 3, 2408, 1, 3976, 608, 28, 1, 88, 23, 464658, 1, 319924724, 3, 7, 1, 1628, 138, 2219409, 1, 6, 5, 594, 1, 872, 3, 92, 1, 392, 65, 2278155, 1, 3755866, 4793, 13, 1, 7873, 3, 614294, 1, 448812437, 5
Offset: 0

Views

Author

M. F. Hasler, Mar 09 2015

Keywords

Comments

See A118119, which is the main entry for this class of sequences.
a(43) <= 8153777984244162781089834. - Max Alekseyev, Aug 06 2015

Examples

			For n=0 and n=4, see formula with k=0 resp. k=1.
For n=1, gcd(m^n+19, (m+1)^n+19) = gcd(m+19, m+20) = 1, therefore a(1)=0.
For n=2, gcd(3^2+19, 4^2+19) = 7 and (m,m+1) = (3,4) is the smallest pair which yields a GCD > 1 here.
		

Crossrefs

Programs

  • Mathematica
    A255869[n_] := Module[{m = 1}, While[GCD[m^n + 19, (m + 1)^n + 19] <= 1, m++]; m]; Join[{1, 0}, Table[A255869[n], {n, 2, 12}]] (* Robert Price, Oct 16 2018 *)
  • PARI
    a(n,c=19,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 x
    def A255869(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+19,(x+1)**n+19)):
            for d in (a for a in nthroot_mod(-19,n,p,all_roots=True) if pow(a+1,n,p)==-19%p):
                k = min(d,k) if k else d
        return k # Chai Wah Wu, May 07 2024

Formula

a(4k) = 1 for k>=0, because gcd(1^(4k)+19, 2^(4k)+19) = gcd(20, 16^k-1) >= 5 since 16 = 1 (mod 5).

Extensions

a(13)-a(40) from Hiroaki Yamanouchi, Mar 12 2015
a(41)-a(42) from Max Alekseyev, Aug 06 2015

A255832 Least m > 0 such that gcd(m^(2n+1)+2, (m+1)^(2n+1)+2) > 1.

Original entry on oeis.org

51, 40333, 434, 16, 1234, 78607, 8310, 817172, 473, 116, 22650, 736546059, 22, 1080982, 252, 7809, 644, 1786225573
Offset: 1

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

For n=0 one has gcd(m+2, m+3) = 1 for any m.
See A255852 for the sequence including also even exponents, for which the GCD is > 1 already for m=1 (because gcd(1^2k+2, 2^2k+2) = gcd(3, 2^2k-1) = gcd(3, 4^k-1) = 3), and also for m=4 (because gcd(4^2k+2, 5^2k+2) = gcd(4^2k+2, (5^k-4^k)(5^k+4^k)) >= 3), etc.
a(21) = 3585, a(22) = 5, a(25) = 16, a(28) = 22, a(29) = 4495, a(31) = 1291, a(32) = 108, a(33) = 220, a(34) = 218039, a(35) = 2112. - Chai Wah Wu, May 08 2024

Crossrefs

Cf. A118119, A255853, A255853, ... for other variants, corresponding to different constant offsets (+1, +3, ...) in the arguments of gcd.

Programs

  • Mathematica
    A255832[n_] := Module[{m = 1}, While[GCD[m^(2 n + 1) + 2, (m + 1)^(2 n + 1) + 2] <= 1, m++]; m];  Table[A255832[n], {n, 1, 10}] (* Robert Price, Oct 15 2018 *)
  • PARI
    a(n,c=2,L=10^6)={n=n*2+1;for(a=1,L,gcd(a^n+c,(a+1)^n+c)>1&&return(n))}
    
  • Python
    from sympy import primefactors, resultant, nthroot_mod
    from sympy.abc import x
    def A255832(n):
        k, t = 0, (n<<1)+1
        for p in primefactors(resultant(x**t+2,(x+1)**t+2)):
            for d in (a for a in nthroot_mod(-2,t,p,all_roots=True) if pow(a+1,t,p)==-2%p):
                k = min(d,k) if k else d
        return k # Chai Wah Wu, May 07 2024

Formula

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

Extensions

a(12)-a(18) from Max Alekseyev, Aug 06 2015

A255853 Least k > 0 such that gcd(k^n+3, (k+1)^n+3) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 6, 56, 3, 29, 96, 1159823, 384, 9, 3, 1994117680, 13, 247, 6, 15, 3, 1256, 4, 25211925041, 15, 5785, 3, 93602696971, 24, 11, 6, 182, 3, 4644, 92, 12506, 9, 13, 3, 484, 2, 420, 6, 130, 3, 16032496, 12
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

See A118119, which is the main entry for this class of sequences.
a(43) <= 291613846670877. - Max Alekseyev, Aug 07 2015

Examples

			For n=1, gcd(k^n+3, (k+1)^n+3) = gcd(k+3, k+4) = 1, therefore a(1)=0.
For n=2, we have gcd(6^2+3, 7^2+3) = gcd(39, 52) = 13, and the pair (k,k+1)=(6,7) is the smallest which yields a GCD > 1, therefore a(2)=6.
		

Crossrefs

Programs

  • Mathematica
    A255853[n_] := Module[{m = 1}, While[GCD[m^n + 3, (m + 1)^n + 3] <= 1, m++]; m]; Join[{1, 0}, Table[A255853[n], {n, 2, 10}]] (* Robert Price, Oct 15 2018 *)
  • PARI
    a(n,c=3,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 x
    def A255853(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+3,(x+1)**n+3)):
            for d in (a for a in sorted(nthroot_mod(-3,n,p,all_roots=True)) if pow(a+1,n,p)==-3%p):
                k = min(d,k) if k else d
                break
        return int(k) # Chai Wah Wu, May 08 2024

Formula

For k>=0, a(6k+4)=3 because gcd(3^(6k+4)+3, 4^(6k+4)+3) = gcd(9^(3k+2)+3, 16^(3k+2)+3) and 9 = 16 = 2 (mod 7) and 2^(3k+2)+3 = 2^2+3 = 0 (mod 7), so the GCD is a positive multiple of 7.

Extensions

a(11)-a(40) from Hiroaki Yamanouchi, Mar 12 2015
a(41)-a(42) from Max Alekseyev, Aug 06 2015

A255856 Least k > 0 such that gcd(k^n+6, (k+1)^n+6) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 2, 1, 48, 9, 1, 19, 14, 1, 2, 77364635, 1, 1943, 2, 1, 5, 299788383228819788, 1, 1578270389554680057141787800241971645032008710129107338825798, 9, 1, 2, 6676, 1, 415, 2, 1, 39, 168338080349, 1, 305, 6806, 1, 2, 9, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

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

Examples

			For n=1, gcd(k^n+6, (k+1)^n+6) = gcd(k+6, k+7) = 1, therefore a(1)=0.
For n=2, we have gcd(2^2+6, 3^2+6) = gcd(10, 15) = 5, and the pair (k,k+1)=(2,3) is the smallest which yields a gcd > 1, therefore a(2)=2.
For n=3k, see formula.
		

Crossrefs

Programs

  • Mathematica
    A255856[n_] := Module[{m = 1}, While[GCD[m^n + 6, (m + 1)^n + 6] <= 1, m++]; m]; Join[{1, 0}, Table[A255856[n], {n, 2, 10}]] (* Robert Price, Oct 15 2018 *)
  • PARI
    a(n,c=6,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 x
    def A255856(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+6,(x+1)**n+6)):
            for d in (a for a in sorted(nthroot_mod(-6,n,p,all_roots=True)) if pow(a+1,n,p)==-6%p):
                k = min(d,k) if k else d
                break
        return int(k) # Chai Wah Wu, May 09 2024

Formula

a(3k)=1 for k>=0, because gcd(1^(3k)+6, 2^(3k)+6) = gcd(7, 8^k-1) = 7.

Extensions

a(11)-a(36) from Hiroaki Yamanouchi, Mar 13 2015

A255857 Least k > 0 such that gcd(k^n+7,(k+1)^n+7) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 14, 320, 56, 675113, 224, 13, 5, 283, 33, 192, 26, 242, 5, 2, 10, 140, 5, 50, 142, 29, 18, 605962, 11, 97, 234881024, 951, 5, 3332537854, 14
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

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

Examples

			For n=0, gcd(k^0+7, (k+1)^0+7) = gcd(8, 8) = 8 for any k > 0, therefore a(0)=1 is the smallest possible positive value.
For n=1, gcd(k^n+7, (k+1)^n+7) = gcd(k+7, k+8) = 1, therefore a(1)=0.
For n=2, we have gcd(14^2+7, 15^2+7) = gcd(203, 232) = 29, and the pair (k,k+1)=(14,15) is the smallest which yields a gcd > 1, therefore a(2)=14.
		

Crossrefs

Programs

  • Mathematica
    A255857[n_] := Module[{m = 1}, While[GCD[m^n + 7, (m + 1)^n + 7] <= 1, m++]; m]; Join[{1, 0}, Table[A255857[n], {n, 2, 25}]] (* Robert Price, Oct 15 2018 *)
  • PARI
    a(n,c=7,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 x
    def A255857(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+7,(x+1)**n+7)):
            for d in (a for a in sorted(nthroot_mod(-7,n,p,all_roots=True)) if pow(a+1,n,p)==-7%p):
                k = min(d,k) if k else d
                break
        return int(k) # Chai Wah Wu, May 09 2024

Extensions

a(26)-a(36) from Hiroaki Yamanouchi, Mar 12 2015

A255858 Least k > 0 such that gcd(k^n + 8, (k+1)^n + 8) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 1, 5, 1, 5238149, 1, 24747, 1, 5, 1, 1042068640211853141849723, 1, 28913777, 1, 5, 1, 9380, 1, 87940, 1, 5, 1, 677083547, 1, 1584, 1, 5, 1, 5355, 1, 257, 1, 5, 1, 118, 1, 3250, 1, 5, 1, 78609080, 1, 1807714890, 1, 5, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

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

Examples

			For n=1, gcd(k^n + 8, (k+1)^n + 8) = gcd(k+8, k+9) = 1, therefore a(1)=0.
For n=2*k, see formula.
For n=3, we have gcd(5^3 + 8, 6^3 + 8) = gcd(133, 224) = 7, and the pair (k,k+1)=(5,6) is the smallest which yields a GCD > 1, therefore a(3)=5.
		

Crossrefs

Programs

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

Formula

a(2k)=1 for k >= 0, because gcd(1^(2k) + 8, 2^(2k) + 8) = gcd(9, 4^k-1) >= 3.

Extensions

a(11)-a(40) from Hiroaki Yamanouchi, Mar 13 2015
a(41)-a(46) from Max Alekseyev, Aug 06 2015

A255854 Least k > 0 such that gcd(k^n+4, (k+1)^n+4) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 8, 210, 1, 82, 128, 4763358550, 1, 22, 8, 4050643070777669523228, 1, 1010633974733, 7784, 100, 1, 26627469676193276478340, 8, 179, 1, 4082, 48, 1293523748876425462850, 1, 173, 8, 5, 1, 2423, 320, 342, 1, 1162, 8, 93, 1, 455207, 128, 22, 1, 11383, 8, 58768, 1, 91, 96, 306824898, 1, 187751, 8, 84, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

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

Examples

			For n=1, gcd(k^n+4, (k+1)^n+4) = gcd(k+4, k+5) = 1, therefore a(1)=0.
For n=2, we have gcd(8^2+4, 9^2+4) = gcd(68, 85) = 17, and the pair (k,k+1)=(8,9) is the smallest with this property, therefore a(2)=8.
More generally, a(8k+2)=8 because gcd(8^(8k+2)+4, 9^(8k+2)+4) = gcd(64^(4k+1)+4, 81^(4k+1)+4) >= 17, since 64 = 81 = 13 (mod 17) and 13^4 = 1 (mod 17).
Also a(4k)=1, because gcd(1^(4k)+4, 2^(4k)+4) = gcd(5, 16^k-1) = 5.
		

Crossrefs

Programs

  • Mathematica
    A255854[n_] := Module[{m = 1}, While[GCD[m^n + 4, (m + 1)^n + 4] <= 1, m++]; m]; Join[{1, 0}, Table[A255854[n], {n, 2, 6}]] (* Robert Price, Oct 15 2018 *)
  • PARI
    a(n,c=4,L=10^6,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 x
    def A255854(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+4,(x+1)**n+4)):
            for d in (a for a in sorted(nthroot_mod(-4,n,p,all_roots=True)) if pow(a+1,n,p)==-4%p):
                k = min(d,k) if k else d
                break
        return int(k) # Chai Wah Wu, May 08 2024

Formula

a(4k)=1, a(8k+2)=8 (k>=0), cf. examples.

Extensions

a(7)-a(46) from Hiroaki Yamanouchi, Mar 13 2015
a(47)-a(52) from Max Alekseyev, Aug 06 2015

A255855 Least k > 0 such that gcd(k^n+5, (k+1)^n+5) > 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 1, 5, 1, 533360, 1, 55, 1, 7, 1, 796479131355665831357, 1, 41, 1, 5, 1, 3775, 1, 42296, 1, 7, 1, 653246700175064613889, 1, 21, 1, 5, 1, 1619, 1, 42842, 1, 7, 1, 2945, 1, 323371, 1, 5, 1, 1102221, 1, 633524110177, 1, 7, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 08 2015

Keywords

Comments

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

Examples

			For n=1, gcd(k^n+5, (k+1)^n+5) = gcd(k+5, k+6) = 1, therefore a(1)=0.
For n=2k, see formula.
For n=3, we have gcd(5^3+5, 6^3+5) = 13, and the pair (k,k+1)=(5,6) is the smallest which yields a GCD > 1, therefore a(3)=5.
		

Crossrefs

Programs

  • Mathematica
    A255855[n_] := Module[{m = 1}, While[GCD[m^n + 5, (m + 1)^n + 5] <= 1, m++]; m]; Join[{1, 0}, Table[A255855[n], {n, 2, 10}]]
  • PARI
    a(n,c=5,L=10^7,S=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 x
    def A255855(n):
        if n == 0: return 1
        k = 0
        for p in primefactors(resultant(x**n+5,(x+1)**n+5)):
            for d in (a for a in sorted(nthroot_mod(-5,n,p,all_roots=True)) if pow(a+1,n,p)==-5%p):
                k = min(d,k) if k else d
                break
        return int(k) # Chai Wah Wu, May 08 2024

Formula

a(2k)=1 for k>=0, because gcd(1^(2k)+5,2^(2k)+5) = gcd(6,4^k-1) = 3.

Extensions

a(11)-a(46) from Hiroaki Yamanouchi, Mar 12 2015
Showing 1-10 of 23 results. Next