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.

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