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.

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

Original entry on oeis.org

2, 2, 3, 4, 3, 3, 3, 2, 3, 6, 8, 4, 11, 5, 3, 16, 7, 6, 5, 5, 3, 10, 5, 3, 4, 5, 3, 4, 11, 4, 7, 11, 3, 30, 5, 3, 7, 19, 3, 10, 7, 6, 7, 11, 5, 12, 14, 6, 7, 5, 3, 12, 13, 9, 5, 8, 6, 6, 11, 4, 4, 6, 3, 64, 5, 6, 10, 6, 3, 10, 6, 6, 5, 37, 3, 30, 7, 12, 7, 20, 3, 40, 19, 9
Offset: 1

Views

Author

Derek Orr, May 25 2014

Keywords

Comments

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

Examples

			(1^2+2^1)/(2+1) = 3/3 = 1 is an integer. Thus a(1) = 2.
		

Crossrefs

Programs

  • Mathematica
    lnk[n_]:=Module[{k=2},While[!IntegerQ[(n^k+k^n)/(k+n)],k++];k]; Array[lnk,90] (* Harvey P. Dale, Sep 02 2015 *)
  • PARI
    a(n)=if(n==1, 2, for(k=2, n, s=(n^k+k^n)/(k+n); if(floor(s)==s, return(k))))
    n=1; while(n<100, print(a(n)); n+=1)
    
  • PARI
    a(n) = my(k=2); while (denominator((n^k+k^n)/(k+n))!=1, k++); k; \\ Michel Marcus, Jun 03 2021