A094290 a(n) = prime(A001511(n)), where A001511 is one more than the 2-adic valuation of n.
2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 11, 2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 13, 2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 11, 2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 11, 2, 3, 2, 5, 2, 3, 2, 7, 2, 3, 2, 5, 2, 3, 2, 13, 2, 3, 2, 5, 2, 3
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Programs
-
Mathematica
Array[Prime[IntegerExponent[#, 2] + 1] &, 102] (* Michael De Vlieger, Nov 02 2018 *)
-
PARI
A094290(n) = prime(1+valuation(n,2)); \\ Antti Karttunen, Nov 02 2018
-
Python
from sympy import prime def A094290(n): return prime((~n & n-1).bit_length()+1) # Chai Wah Wu, Jul 02 2022
Formula
Extensions
Replaced the name with a formula given by Omar E. Pol, which is equivalent to the original definition. - Antti Karttunen, Nov 02 2018
Comments