login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117656 Number of solutions to x^(k+2)=x^2 mod n for some k>=1. 2
1, 2, 3, 4, 5, 6, 7, 6, 9, 10, 11, 12, 13, 14, 15, 12, 17, 18, 19, 20, 21, 22, 23, 18, 25, 26, 21, 28, 29, 30, 31, 20, 33, 34, 35, 36, 37, 38, 39, 30, 41, 42, 43, 44, 45, 46, 47, 36, 49, 50, 51, 52, 53, 42, 55, 42, 57, 58, 59, 60, 61, 62, 63, 40, 65, 66, 67, 68, 69, 70, 71, 54 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Andrew Howroyd)

Steven R. Finch, Idempotents and Nilpotents Modulo n, arXiv:math/0605019 [math.NT], 2006-2017.

FORMULA

Multiplicative with a(p^e) = p^floor(e/2) + (p-1)*p^(e-1) for prime p. - Andrew Howroyd, Jul 17 2018

Sum_{k=1..n} a(k) ~ c*n^2, where c = (1/2) * Product_{p prime} (1 - 1/(p^2*(p^2 + p + 1))) = 0.47717662698737204270... - Amiram Eldar, Sep 08 2020

MATHEMATICA

a[n_] := Product[{p, e} = pe; p^Quotient[e, 2] + (p-1)*p^(e-1), {pe, FactorInteger[n]}]; Array[a, 72] (* Jean-Fran├žois Alcover, Sep 13 2018, after Andrew Howroyd *)

PROG

(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); p^(e\2) + (p-1)*p^(e-1))} \\ Andrew Howroyd, Jul 17 2018

CROSSREFS

Cf. A117657, A117659.

Sequence in context: A066853 A264856 A141258 * A101918 A291169 A323633

Adjacent sequences:  A117653 A117654 A117655 * A117657 A117658 A117659

KEYWORD

mult,nonn

AUTHOR

Steven Finch, Apr 11 2006

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 May 17 12:55 EDT 2021. Contains 343971 sequences. (Running on oeis4.)