login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117658 Number of solutions to x^(k+1) = x^k mod n for some k >= 1. 2

%I #31 Sep 21 2023 01:45:29

%S 1,2,2,3,2,4,2,5,4,4,2,6,2,4,4,9,2,8,2,6,4,4,2,10,6,4,10,6,2,8,2,17,4,

%T 4,4,12,2,4,4,10,2,8,2,6,8,4,2,18,8,12,4,6,2,20,4,10,4,4,2,12,2,4,8,

%U 33,4,8,2,6,4,8,2,20,2,4,12

%N Number of solutions to x^(k+1) = x^k mod n for some k >= 1.

%C If n is prime, then the solutions are x = 0, 1, and so a(n) = 2. - _Michael B. Porter_, Jul 08 2016

%C The set of solutions is independent of the choice of k. - _Michael B. Porter_, Jul 08 2016

%H Robert Israel, <a href="/A117658/b117658.txt">Table of n, a(n) for n = 1..10000</a>

%H Steven R. Finch, <a href="http://arxiv.org/abs/math.NT/0605019">Idempotents and Nilpotents Modulo n</a>, arXiv:math/0605019 [math.NT], 2006-2017.

%F a(n) = Sum_{k=1..n} floor((k^n-k^(n-1))/n)-floor((k^n-k^(n-1)-1)/n). - _Anthony Browne_, Jul 06 2016

%F Multiplicative with a(p^e) = 1 + p^(e-1) for primes p. - _Robert Israel_, Jul 06 2016

%F Dirichlet g.f.: zeta(s) * zeta(s-1) * Product_{p prime} (1 - 1/p^(s-1) + 1/p^s - 1/p^(2*s)). - _Amiram Eldar_, Sep 21 2023

%e For n = 10, using k = 1, the solutions are x = 0, 1, 5, and 6, so a(10) = 4. - _Michael B. Porter_, Jul 08 2016

%p f:= proc(n) local F,f;

%p F:= ifactors(n)[2];

%p mul(1 + f[1]^(f[2]-1), f = F)

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Jul 06 2016

%t a[n_] := Module[{F, f}, F = FactorInteger[n]; Product[1 + f[[1]]^(f[[2]] - 1), {f, F}]]; a[1] = 1; Array[a, 100] (* _Jean-François Alcover_, Nov 05 2016, after _Robert Israel_ *)

%o (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + f[i,1]^(f[i,2]-1));} \\ _Amiram Eldar_, Sep 21 2023

%Y Cf. A117659.

%K mult,nonn,easy

%O 1,2

%A _Steven Finch_, Apr 11 2006

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 01:48 EDT 2024. Contains 375462 sequences. (Running on oeis4.)