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

A242801 Least number k > 1 such that (k^k+n)/(k+n) is an integer.

Original entry on oeis.org

3, 4, 3, 6, 3, 8, 5, 4, 3, 4, 5, 7, 11, 4, 5, 18, 4, 20, 5, 8, 3, 11, 9, 4, 5, 13, 9, 16, 7, 19, 7, 4, 11, 5, 5, 7, 19, 4, 9, 16, 7, 9, 5, 6, 15, 16, 5, 8, 7, 7, 9, 13, 19, 12, 5, 7, 12, 29, 4, 5, 16, 16, 9, 10, 7, 16, 13, 16, 6, 17, 9, 13, 5, 16, 5, 9, 7, 13, 7, 4, 9, 41, 15
Offset: 1

Views

Author

Derek Orr, May 23 2014

Keywords

Comments

It is believed that a(n) <= n+2 for all n > 0.
a(n) also exists for all n < 1. - Robert G. Wilson v, Jun 05 2014

Examples

			(2^2+1)/(2+1) = 5/3 is not an integer. (3^3+1)/(3+1) = 28/4 = 7 is an integer. Thus a(1) = 3.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 2}, While[ Mod[ PowerMod[k, k, k + n] + n, k + n] != 0, k++]; k]; Array[f, 90] (* Robert G. Wilson v, Jun 05 2014 *)
  • PARI
    a(n)=for(k=2,1000,s=(k^k+n)/(k+n);if(floor(s)==s,return(k)));
    n=1;while(n<100,print(a(n), ", ");n+=1) \\ corrected by Michel Marcus, May 24 2014

A251603 Numbers k such that k + 2 divides k^k - 2.

Original entry on oeis.org

3, 4551, 46775, 82503, 106976, 1642796, 4290771, 4492203, 4976427, 21537831, 21549347, 21879936, 51127259, 56786087, 60296571, 80837771, 87761787, 94424463, 96593696, 138644871, 168864999, 221395539, 255881451, 297460451, 305198247, 360306363, 562654203
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 05 2014

Keywords

Comments

Numbers k such that (k^k - 2)/(k + 2) is an integer.
Since k == -2 (mod k+2), also numbers k such that k + 2 divides (-2)^k - 2. - Robert Israel, Jan 04 2015
Numbers k == 0 (mod 4) such that A066602(k/2+1) = 8, and odd numbers k such that k = 3 or A082493(k+2) = 8. - Robert Israel, Apr 08 2015

Examples

			3 is in this sequence because 3 + 2 = 5 divides 3^3 - 2 = 25.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10000] | Denominator((n^n-2)/(n+2)) eq 1];
    
  • Maple
    isA251603 := proc(n)
        if modp(n &^ n-2,n+2) = 0 then
            true;
        else
            false;
        end if;
    end proc:
    A251603 := proc(n)
        option remember;
        local a;
        if n = 1 then
            3;
        else
            for a from procname(n-1)+1 do
                if isA251603(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jan 09 2015
  • Mathematica
    Select[Range[10^6], Mod[PowerMod[#, #, # + 2] - 2, # + 2] == 0 &] (* Michael De Vlieger, Dec 20 2014, based on Robert G. Wilson v at A252041 *)
  • PARI
    for(n=1,10^9,if(Mod(n,n+2)^n==+2,print1(n,", "))); \\ Joerg Arndt, Dec 06 2014
    
  • Python
    A251603_list = [n for n in range(1,10**6) if pow(n, n, n+2) == 2] # Chai Wah Wu, Apr 13 2015

Formula

The even terms form A122711, the odd terms are those in A245319 (forming A357125) decreased by 2. - Max Alekseyev, Sep 22 2016

Extensions

a(6)-a(27) from Joerg Arndt, Dec 06 2014

A252041 Numbers m such that m - 3 divides m^m + 3.

Original entry on oeis.org

1, 2, 4, 5, 6, 9, 10, 85, 105, 136, 186, 262, 820, 1161, 2626, 2926, 4924, 10396, 11656, 19689, 27637, 33736, 36046, 42886, 42901, 53866, 55189, 82741, 95266, 103762, 106822, 127401, 135460, 251506, 366796, 375220, 413326, 466966, 531445, 553456, 568876
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 12 2014

Keywords

Comments

Numbers m such that (m^m + 3)/(m - 3) is an integer.
Most but not all terms are congruent to 4 modulo 6. - Robert G. Wilson v, Dec 19 2014
Note that m^m == 3^m (mod m-3). - Robert Israel, Dec 19 2014

Examples

			2 is in this sequence because (2^2 + 3)/(2 - 3) = -7 is an integer.
4 is in this sequence because (4^4 + 3)/(4 - 3) = 259 is an integer.
7 is not in the sequence because (7^7 + 3)/4 = 411773/2, which is not an integer.
		

Crossrefs

Cf. ...............Numbers n such that x divides y, where:
...x......y....k = 0.....k = 1.....k = 2......k = 3.......
..n-k..n^n-k..A000027...A087156...A242787....A242788......
..n-k..n^n+k..A000027..see below..A249751..this sequence..
..n+k..n^n-k..A000027...A004275...A251603....A251862......
..n+k..n^n+k..A000027...A004273...A213382....A242800......
(For x=n-1 and y=n^n+1, the only terms are 0, 2 and 3. - David L. Harden, Dec 28 2014)

Programs

  • Magma
    [n: n in [4..50000] | Denominator((n^n+3)/(n-3)) eq 1];
    
  • Maple
    select(t -> 3 &^t + 3 mod (t-3) = 0, [1,2,$4..10^6]); # Robert Israel, Dec 19 2014
  • Mathematica
    fQ[n_] := Mod[PowerMod[n, n, n - 3] + 3, n - 3] == 0; Select[Range@ 1000000, fQ] (* Michael De Vlieger, Dec 13 2014; modified by Robert G. Wilson v, Dec 19 2014 *)
  • PARI
    isok(n) = (n != 3) && (Mod(n, n-3)^n  == -3); \\ Michel Marcus, Dec 13 2014

Extensions

More terms from Michel Marcus, Dec 13 2014

A249751 Numbers m such that m - 2 divides m^m + 2.

Original entry on oeis.org

3, 4, 7, 8, 67, 260, 379, 1191, 1471, 5076, 25807, 58591, 103780, 134947, 137347, 170587, 203236, 272611, 285391, 420211, 453748, 538735, 540856, 592411, 618451, 680707, 778807, 1163067, 1306936, 1520443, 1700947, 1891336, 2099203, 2831011, 3481960, 4020031
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 05 2014

Keywords

Examples

			3 is in this sequence because (3^3 + 2)/(3 - 2) = 29 is an integer.
		

Crossrefs

Programs

  • Magma
    [n: n in [3..10000] | Denominator((n^n+2)/(n-2)) eq 1];
    
  • Mathematica
    fQ[n_] := Mod[ PowerMod[ n, n, n - 2] + 2, n - 2] == 0; Select[ Range@ 4100000, fQ] (* Robert G. Wilson v, Dec 19 2014 *)
  • Python
    A249751_list = [n for n in range(3,10**7) if n==3 or pow(n,n,n-2) == n-4]
    # Chai Wah Wu, Dec 06 2014

Extensions

More terms from Chai Wah Wu, Dec 06 2014

A251862 Numbers m such that m + 3 divides m^m - 3.

Original entry on oeis.org

3, 7, 10, 27, 727, 1587, 9838, 758206, 789223, 1018846, 1588126, 1595287, 2387206, 4263586, 9494746, 12697378, 17379860, 21480726, 25439767, 38541526, 44219926, 55561536, 62072326, 64335356, 70032586, 83142466, 85409276
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 10 2014

Keywords

Comments

m such that m+3 divides (-3)^m - 3. - Robert Israel, Dec 14 2014

Examples

			3 is in this sequence because 3 + 3 = 6 divides 3^3 - 3 = 24.
		

Crossrefs

Cf. ...............Numbers n such that x divides y, where:
...x.....y......k=0.......k=1.......k=2........k=3........
..n-k..n^n-k..A000027...A087156...A242787....A242788......
..n-k..n^n+k..A000027..see below..A249751....A252041......
..n+k..n^n-k..A000027...A004275...A251603..this sequence..
..n+k..n^n+k..A000027...A004273...A213382....A242800......
(For x=n-1 and y=n^n+1, the only terms are 0, 2 and 3. - David L. Harden, Jan 14 2015)

Programs

  • Magma
    [n: n in [2..10000] | Denominator((n^n-3)/(n+3)) eq 1];
    
  • Maple
    select(t ->((-3) &^ (t) - 3) mod (t+3) = 0, [$1..10^6]); # Robert Israel, Dec 14 2014
  • Mathematica
    a251862[n_] := Select[Range[n], Mod[PowerMod[#, #, # + 3] - 3, # + 3] == 0 &]; a251862[10^6] (* Michael De Vlieger, Dec 14 2014, after Robert G. Wilson v at A252041 *)
  • PARI
    isok(n) = Mod(n, n+3)^n == 3; \\ Michel Marcus, Dec 10 2014
    
  • Python
    A251862_list = [n for n in range(10**6) if pow(-3, n, n+3) == 3] # Chai Wah Wu, Jan 19 2015
  • Sage
    [n for n in range(10^4) if (n + 3).divides((-3)^n - 3)] # Peter Luschny, Jan 17 2015
    

Extensions

More terms from Michel Marcus, Dec 10 2014

A252606 Numbers j such that j + 2 divides 2^j + 2.

Original entry on oeis.org

3, 4, 16, 196, 2836, 4551, 5956, 25936, 46775, 65536, 82503, 540736, 598816, 797476, 1151536, 3704416, 4290771, 4492203, 4976427, 8095984, 11272276, 13362420, 21235696, 21537831, 21549347, 29640832, 31084096, 42913396, 49960912, 51127259, 55137316, 56786087, 60296571, 70254724, 70836676
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 03 2015

Keywords

Comments

Numbers j such that (2^j + 2)/(j + 2) is an integer. Numbers j such that (2^j - j)/(j + 2) is an integer.
From Robert Israel, Apr 09 2015: (Start)
The even members of this sequence (4, 16, 196, 2836, ...) are the numbers 2*k-2 where k>=3 is odd and 4^k == -8 (mod k).
The odd members of this sequence (3, 4551, 46775, 82503, ...) are the numbers k-2 where k>=3 is odd and 2^k == -8 (mod k). (End)
2^m is in this sequence for m = (2, 4, 16, 36, 120, 256, 456, 1296, 2556, ...), with the subsequence m = 2^k, k = (1, 2, 4, 8, 16, ...). - M. F. Hasler, Apr 09 2015

Examples

			3 is in this sequence because (2^3 + 2)/(3 + 2) = 2.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1200000] | Denominator((2^n+2)/(n+2)) eq 1];
    
  • Maple
    select(t -> 2 &^t + 2 mod (t + 2) = 0, [$1..10^6]); # Robert Israel, Apr 09 2015
  • Mathematica
    Select[Range[10^6],IntegerQ[(2^#+2)/(#+2)]&] (* Ivan N. Ianakiev, Apr 17 2015 *)
  • PARI
    for(n=1,10^5,if((2^n+2)%(n+2)==0,print1(n,", "))) \\ Derek Orr, Apr 05 2015
    
  • PARI
    is(n)=Mod(2,n+2)^n==-2 \\ M. F. Hasler, Apr 09 2015
    
  • Python
    A252606_list = [n for n in range(10**4) if pow(2, n, n+2) == n] # Chai Wah Wu, Apr 16 2015

Extensions

a(17)-a(22) from Tom Edgar, Mar 03 2015
More terms from Chai Wah Wu, Apr 16 2015

A257002 Primes p such that p+2 divides p^p+2.

Original entry on oeis.org

7, 13, 19, 31, 37, 61, 67, 109, 127, 139, 157, 181, 193, 199, 211, 307, 313, 337, 379, 397, 409, 487, 499, 541, 571, 577, 631, 691, 751, 769, 787, 811, 829, 877, 919, 937, 991, 1009, 1021, 1039, 1117, 1201, 1291, 1297, 1327, 1381, 1399, 1459, 1471, 1531, 1567
Offset: 1

Views

Author

K. D. Bajpai, Apr 14 2015

Keywords

Comments

All the terms in this sequence are congruent to 1 mod 3.
Primes p such that 2^p == 2 (mod p+2). Includes A091180. - Robert Israel, Apr 14 2015

Examples

			a(1) = 7 is prime; 7+2 = 9 divides 7^7 + 2 = 823545.
a(2) = 13 is prime; 13+2 = 15 divides 13^13 + 2 = 302875106592255.
		

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(1600) | (p^p+2) mod (p+2) eq 0 ]; // Vincenzo Librandi, Apr 15 2015
  • Maple
    select(t -> isprime(t) and (2 &^t - 2) mod (t+2) = 0, [seq(6*i+1,i=1..10^4)]); # Robert Israel, Apr 14 2015
  • Mathematica
    Select[Prime[Range[3000]], Mod[#^# + 2, # + 2] == 0 &]
    Select[Prime[Range[500]],PowerMod[#,#,#+2]==#&] (* Harvey P. Dale, May 19 2017 *)
  • PARI
    forprime(p=2,1000, if(Mod(p^p+2,p+2)==0, print1(p, ", ")));
    
  • Python
    from sympy import prime
    A257002_list = [p for p in (prime(n) for n in range(1,10**4)) if pow(p, p, p+2) == p] # Chai Wah Wu, Apr 14 2015
    

A271267 Even numbers k such that k + 2 divides k^k + 2.

Original entry on oeis.org

4, 16, 196, 2836, 5956, 25936, 65536, 540736, 598816, 797476, 1151536, 3704416, 8095984, 11272276, 13362420, 21235696, 29640832, 31084096, 42913396, 49960912, 55137316, 70254724, 70836676, 81158416, 94618996, 111849956, 129275056, 150026176, 168267856, 169242676, 189796420, 192226516, 198464176, 208232116, 244553296, 246605776, 300018016, 318143296
Offset: 1

Views

Author

Altug Alkan, Apr 03 2016

Keywords

Comments

In other words, even numbers k such that k + 2 divides A014566(k) + 1.
Even terms of A213382.
4, 16, 65536 are the numbers of the form 2^(2^(2^k)), for k >= 0. Are there other members of this sequence with the form of 2^(2^(2^k))?
2^(2^(2^3)) and 2^(2^(2^4)) are terms. - Michael S. Branicky, Apr 16 2021

Examples

			4 is a term because 4 + 2 = 6 divides 4^4 + 2 = 258.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 10^4, 2], Divisible[#^# + 2, # + 2] &] (* Michael De Vlieger, Apr 03 2016 *)
  • PARI
    lista(nn) = forstep(n=2, nn, 2, if( Mod(n, n+2)^n == -2 , print1(n, ", "))); \\ Joerg Arndt, Apr 03 2016
    
  • Python
    def afind(limit):
      k = 2
      while k < limit:
        if (pow(k, k, k+2) + 2)%(k+2) == 0: print(k, end=", ")
        k += 2
    afind(10**7) # Michael S. Branicky, Apr 16 2021
Showing 1-8 of 8 results.