cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A087963 Exponent of highest power of 2 dividing 3*prime(n)+1.

This page as a plain text file.
%I A087963 #31 Mar 17 2025 15:48:57
%S A087963 0,1,4,1,1,3,2,1,1,3,1,4,2,1,1,5,1,3,1,1,2,1,1,2,2,4,1,1,3,2,1,1,2,1,
%T A087963 6,1,3,1,1,3,1,5,1,2,4,1,1,1,1,4,2,1,2,1,2,1,3,1,6,2,1,4,1,1,2,3,1,2,
%U A087963 1,3,2,1,1,5,1,1,4,3,2,2,1,4,1,2,1,1,2,2,3,1,1,1,1,1,1,1,3,2,1,3,1,3,1,2,1
%N A087963 Exponent of highest power of 2 dividing 3*prime(n)+1.
%H A087963 Amiram Eldar, <a href="/A087963/b087963.txt">Table of n, a(n) for n = 1..10000</a>
%F A087963 a(n) = A007814(3*prime(n)+1).
%e A087963 For n = 10: p = prime(10) = 29, 3*p + 1 = 88 = 2^3 * 11, a(10) = 3.
%t A087963 ffi[x_] := Flatten[FactorInteger[x]]; e2[x_] := Part[[ffi[x]], 2]; Table[e2[3*Prime[w]+1], {w, 1, 100}]
%t A087963 IntegerExponent[3 * Prime[Range[100]] + 1, 2] (* _Amiram Eldar_, Jul 12 2024 *)
%o A087963 (PARI) a(n) = valuation(3*prime(n)+1, 2); \\ _Michel Marcus_, Sep 01 2016
%o A087963 (Magma) [Valuation(3*NthPrime(n)+1, 2): n in [1..80]]; // _Vincenzo Librandi_, Sep 01 2016
%o A087963 (Python)
%o A087963 from sympy import prime
%o A087963 def A087963(n): return (~(m:=prime(n)*3+1)&m-1).bit_length() # _Chai Wah Wu_, Jul 10 2022
%Y A087963 Cf. A087272, A087273, A087274, A007814, A087230.
%K A087963 nonn
%O A087963 1,3
%A A087963 _Labos Elemer_, Sep 18 2003
%E A087963 a(1)=0 corrected by _Michel Marcus_, Sep 01 2016