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!)
A065293 Number of values of s, 0 <= s <= n-1, such that 2^s mod n = s. 2
1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 2, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 0, 3, 0, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 1, 0, 2, 1, 0, 0, 0, 2, 1, 1, 1, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,21

LINKS

Michel Marcus, Table of n, a(n) for n = 1..1000

EXAMPLE

For n=5 we have (2^0) mod 5 = 1, (2^1) mod 5 = 2, (2^2) mod 5 = 4, (2^3) mod 5 = 3, (2^4) mod 5 = 1. Only for s=3 does (2^s) mod 5=s, so a(5)=1

MATHEMATICA

Table[Count[Range[0, n - 1], _?(Mod[2^#, n] == # &)], {n, 105}] (* Michael De Vlieger, Jun 19 2018 *)

PROG

(PARI) a(n) = sum(s=0, n-1, Mod(2, n)^s == s); \\ Michel Marcus, Jun 19 2018

CROSSREFS

Cf. A065294.

Sequence in context: A025888 A145708 A138532 * A164615 A182034 A171912

Adjacent sequences:  A065290 A065291 A065292 * A065294 A065295 A065296

KEYWORD

nonn

AUTHOR

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 28 2001

EXTENSIONS

a(1) corrected by Michel Marcus, Jun 20 2018

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 July 9 14:56 EDT 2020. Contains 335543 sequences. (Running on oeis4.)