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

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

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

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

Original entry on oeis.org

2, 3, 2, 2, 3, 3, 3, 4, 3, 4, 3, 6, 4, 7, 3, 4, 5, 4, 7, 5, 5, 4, 7, 9, 4, 7, 3, 7, 5, 13, 5, 4, 9, 12, 5, 6, 10, 16, 9, 4, 9, 16, 7, 5, 5, 4, 10, 13, 7, 7, 11, 13, 5, 9, 7, 6, 5, 12, 19, 9, 11, 17, 7, 7, 5, 11, 4, 16, 9, 5, 11, 16, 9, 13, 15, 13, 9, 12, 7, 31, 6, 16, 5
Offset: 1

Views

Author

Derek Orr, May 22 2014

Keywords

Comments

a(n) <= n+1 for all n.

Examples

			(2^2-8)/(2-8) = -4/-6 is not an integer. (3^3-8)/(3-8) = 19/-5 is not an integer. (4^4-8)/(4-8) = 248/4 = 62 is an integer. Thus a(8) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 2}, While[k == n || ! Divisible[k^k - n, k - n], k++]; k]; Array[a, 100] (* Amiram Eldar, Jun 04 2021 *)
  • PARI
    a(n)=for(k=2,n+1,if(k!=n,s=(k^k-n)/(k-n);if(floor(s)==s,return(k))));
    n=1;while(n<100,print(a(n));n+=1)

A242796 Least number k such that (k^k-n)/(k-n) is prime, or 0 if no such k exists.

Original entry on oeis.org

2, 4, 6, 5, 0, 13, 9, 11, 0, 12, 22, 13, 37, 28, 36, 0, 0, 171, 73, 85, 0, 0, 0, 29, 0, 0, 0, 0, 517, 35, 40, 49, 44, 49, 0, 41, 46, 40, 0, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2841, 0, 0, 0, 0, 0, 0, 67, 0, 64, 0, 199, 125, 221, 0, 0, 153, 113, 239, 0, 97, 0, 0, 0
Offset: 1

Views

Author

Derek Orr, May 22 2014

Keywords

Comments

a(n)=0 is confirmed for k <= 5000.

Examples

			(1^1-2)/(1-2) = 1 is not prime. (3^3-2)/(3-2) = 25 is not prime. (4^4-2)/(4-2) = 254/2 = 127 is prime. Thus a(2) = 4.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,5000,if(k!=n,s=(k^k-n)/(k-n);if(floor(s)==s,if(ispseudoprime(s),return(k)))));
    n=1;while(n<100,print(a(n));n+=1)

Extensions

We don't normally allow conjectural terms, except in special circumstances. This is one of those exceptions, for if we included only terms that are known for certain, not much of this sequence would remain. - N. J. A. Sloane, May 31 2014
Showing 1-4 of 4 results.