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!)
A062173 a(n) = 2^(n-1) mod n. 26
0, 0, 1, 0, 1, 2, 1, 0, 4, 2, 1, 8, 1, 2, 4, 0, 1, 14, 1, 8, 4, 2, 1, 8, 16, 2, 13, 8, 1, 2, 1, 0, 4, 2, 9, 32, 1, 2, 4, 8, 1, 32, 1, 8, 31, 2, 1, 32, 15, 12, 4, 8, 1, 14, 49, 16, 4, 2, 1, 8, 1, 2, 4, 0, 16, 32, 1, 8, 4, 22, 1, 32, 1, 2, 34, 8, 9, 32, 1, 48, 40, 2, 1, 32, 16, 2, 4, 40, 1, 32, 64, 8, 4, 2, 54, 32, 1, 58, 58, 88, 1, 32, 1, 24, 46 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

If p is an odd prime then a(p)=1. However, a(n) is also 1 for pseudoprimes to base 2 such as 341.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..101101 (first 1000 terms from Harry J. Smith)

Index entries for sequences related to pseudoprimes

EXAMPLE

a(5) = 2^(5-1) mod 5 = 16 mod 5 = 1.

MATHEMATICA

Array[Mod[2^(# - 1), #] &, 105] (* Michael De Vlieger, Jul 01 2018 *)

PROG

(PARI) A062173(n) = if(1==n, 0, lift(Mod(2, n)^(n-1))); \\ Antti Karttunen, Jul 01 2018

(Haskell)

import Math.NumberTheory.Moduli (powerMod)

a062173 n = powerMod 2 (n - 1) n  -- Reinhard Zumkeller, Oct 17 2015

CROSSREFS

Cf. A000079, A001567, A015910, A015919, A062172, A082495, A257531, A305890.

Cf. A176997 (after the initial term, gives the positions of ones).

Sequence in context: A327805 A276689 A091453 * A004558 A129699 A002349

Adjacent sequences:  A062170 A062171 A062172 * A062174 A062175 A062176

KEYWORD

nonn

AUTHOR

Henry Bottomley, Jun 12 2001

EXTENSIONS

More terms from Antti Karttunen, Jul 01 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 February 24 03:22 EST 2020. Contains 332195 sequences. (Running on oeis4.)