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!)
A309816 a(n) is the 2-adic valuation of A014664(n). 1

%I #17 Nov 10 2023 18:21:35

%S 1,2,0,1,2,3,1,0,2,0,2,2,1,0,2,1,2,1,0,0,0,1,0,4,2,0,1,2,2,0,1,2,1,2,

%T 0,2,1,0,2,1,2,0,5,2,0,1,0,1,2,0,0,3,1,4,0,2,0,2,1,1,2,1,0,2,2,1,0,1,

%U 2,3,0,0,2,1,0,2,2,3,2,1,2,0,3,0,1,5,2

%N a(n) is the 2-adic valuation of A014664(n).

%C Let p and q be distinct odd primes. Then there exists an integer i such that 2^i == -1 (mod p*q) if and only if a(u) = a(v) and a(u), a(v) > 0, where u and v are the indices of p and q in A000040, respectively (cf. Anderson, Preece, 2008, Lemma 1.4).

%H I. Anderson and D. A. Preece, <a href="https://doi.org/10.1016/j.disc.2007.07.051">A general approach to constructing power-sequence terraces for Z_n</a>, Discrete Mathematics, Vol. 308, No. 5-6 (2008), 631-644.

%e For n = 7: A014664(7) = 8 and the 2-adic valuation of 8 is 3, since 2^3 = 8, so a(7) = 3.

%o (PARI) a(n) = valuation(znorder(Mod(2, prime(n))), 2);

%o (Python)

%o from sympy import n_order, prime

%o def A309816(n): return (~(m:=n_order(2,prime(n))) & m-1).bit_length() # _Chai Wah Wu_, Nov 10 2023

%Y Cf. A000040, A014664.

%K nonn,easy

%O 2,2

%A _Felix Fröhlich_, Aug 18 2019

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 23 07:16 EDT 2024. Contains 371905 sequences. (Running on oeis4.)