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!)
A269266 a(n) = 2^n mod 31. 2
1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

REFERENCES

Continued fraction expansion of (1651+sqrt(3236405))/2386. - Bruno Berselli, Mar 31 2016

LINKS

Muniru A Asiru, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).

FORMULA

G.f.: (1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4)/(1 - x^5).

a(n) = a(n-5).

a(n) = 2^(n mod 5). - Bruno Berselli, Mar 31 2016

MATHEMATICA

PowerMod[2, Range[0, 100], 31]

PROG

(MAGMA) [Modexp(2, n, 31): n in [0..100]];

(MAGMA) &cat [[1, 2, 4, 8, 16]^^20] // Bruno Berselli, Mar 31 2016

(PARI) a(n)=2^(n%5) \\ Charles R Greathouse IV, Mar 31 2016

(PARI) x='x+O('x^99); Vec((1+2*x+4*x^2+8*x^3+16*x^4)/(1-x^5)) \\ Altug Alkan, Mar 31 2016

(Sage) [2^mod(n, 5) for n in (0..100)] # Bruno Berselli, Mar 31 2016

(Python) for n in range(0, 100):print(2**n%31) # Soumil Mandal, Apr 03 2016

(GAP) List([0..70], n->PowerMod(2, n, 31)); # Muniru A Asiru, Jan 30 2019

CROSSREFS

Cf. A201912 (11th row of the triangle).

Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), this sequence (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67).

Sequence in context: A002546 A289089 A010745 * A317506 A317501 A097777

Adjacent sequences:  A269263 A269264 A269265 * A269267 A269268 A269269

KEYWORD

nonn,easy

AUTHOR

Vincenzo Librandi, Mar 31 2016

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 September 25 09:32 EDT 2021. Contains 347654 sequences. (Running on oeis4.)