login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A191833 Least number k such that k^k == k+1 (mod m), or 0 if no such k exists, where m = A007310(n). 2
1, 7, 10, 14, 19, 11, 16, 3, 27, 43, 46, 178, 55, 36, 100, 64, 33, 79, 147, 43, 56, 258, 16, 86, 135, 52, 31, 27, 398, 335, 33, 187, 213, 151, 43, 680, 163, 61, 38, 243, 29, 327, 39, 213, 2068, 72, 37, 799, 198, 223, 141, 887, 92, 304, 132, 250, 808, 217, 327, 192, 271, 538, 398, 187, 79, 38, 31, 1713, 0, 413, 24, 1287, 976, 501, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

k^k == k+1 (mod m) does not have any solutions for m = 2 or 3, so only numbers in A007310 need be considered.

In general, if there is a solution, the first is less than m * phi(m), where phi is the Euler totient function A000010, since the values loop from that point (at least for units).

a(n) = 0 if and only if A007310(n) is in A191834. - Robert Israel, Sep 12 2017

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

f:= proc(n) local m, k;

  m:= (6*n + (-1)^n - 3)/2;

  for k from 1 to ilcm(m, numtheory:-phi(m)) do

    if igcd(k, m) = 1 and k &^ k - k - 1 mod m = 0 then return k fi;

  od:

  0

end proc:

map(f, [$1..100]); # Robert Israel, Sep 12 2017

MATHEMATICA

A007310[n_] := 2*n + 2*Floor[n/2] - 1; a[n_] := (For[m = A007310[n]; k = 1, k <= m^2, k++, If[PowerMod[k, k, m] == Mod[k+1, m], Return[k]]]; 0); Table[a[n], {n, 1, 75}] (* Jean-Fran├žois Alcover, Sep 13 2013 *)

PROG

(PARI) a(n)=local(m); m=A007310(n); for(k=1, m^2, if(Mod(k, m)^k==k+1, return(k))); 0

CROSSREFS

Cf. A007310, A191834.

Sequence in context: A005526 A192292 A030123 * A020752 A134302 A229306

Adjacent sequences:  A191830 A191831 A191832 * A191834 A191835 A191836

KEYWORD

nonn

AUTHOR

Franklin T. Adams-Watters, Jun 17 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 04:43 EST 2019. Contains 329853 sequences. (Running on oeis4.)