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!)
A249275 a(n) is the smallest b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^3). 11

%I #43 May 18 2022 07:59:06

%S 9,26,57,18,124,239,158,333,42,1215,513,691,1172,3038,295,1468,2511,

%T 15458,3859,6372,923,1523,5436,1148,412,4943,4432,5573,476,68,21304,

%U 30422,6021,8881,33731,25667,3868,3170,17987,26626,43588,7296,14628,22076,138057

%N a(n) is the smallest b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^3).

%C a(n) >= A039678(n) for all n.

%H Vincenzo Librandi, <a href="/A249275/b249275.txt">Table of n, a(n) for n = 1..100</a>

%t Array[Block[{b = 2}, While[PowerMod[b, # - 1, #^3] != 1, b++]; b] &@ Prime@ # &, 45] (* _Michael De Vlieger_, Nov 25 2018 *)

%t dpa[n_]:=Module[{p=Prime[n], a=9}, While[PowerMod[a, p - 1, p^3]!=1, a++]; a]; Array[dpa, 50] (* _Vincenzo Librandi_, Nov 30 2018 *)

%o (PARI) a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^3)^(p-1)==1, return(b)))

%o (Python)

%o from sympy import prime

%o def a(n):

%o b, p = 2, prime(n)

%o p3 = p**3

%o while pow(b, p-1, p3) != 1: b += 1

%o return b

%o print([a(n) for n in range(1, 46)]) # _Michael S. Branicky_, Sep 26 2021

%o (Python)

%o from sympy import prime

%o from sympy.ntheory.residue_ntheory import nthroot_mod

%o def A249275(n): return 2**3+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**3,True)[1]) # _Chai Wah Wu_, May 17 2022

%Y Cf. A039678, A242742.

%K nonn

%O 1,1

%A _Felix Fröhlich_, Oct 24 2014

%E Edited by _Felix Fröhlich_, Nov 24 2018

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 April 25 16:38 EDT 2024. Contains 371989 sequences. (Running on oeis4.)