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.

A094290 a(n) = prime(A001511(n)), where A001511 is one more than the 2-adic valuation of n.

This page as a plain text file.
%I A094290 #35 Jul 02 2022 13:15:14
%S A094290 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,
%T A094290 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,
%U A094290 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
%N A094290 a(n) = prime(A001511(n)), where A001511 is one more than the 2-adic valuation of n.
%C A094290 Originally defined as: a(1) = 2 = prime(1). Then the first occurrence of prime(n) followed by all previous terms. i.e. If the index of first occurrence of prime(n) is k then the next k-1 terms are defined as a(k+r) = a(r), r = 1 to k-1. and a(2k) = prime(n+1) and so on.
%C A094290 Index of the first occurrence of prime(n)= 2^(n-1). Subsidiary sequences: If prime(n) is replaced by f(n) a large number of sequences can be obtained choosing f(n) = composite(n), f(n) = n^2,f(n) = n^r, r =3,4,5,..., f(n) = tau(n), f(n) = sigma(n), f(n) = n!, f(n) = Fibonacci(n), f(n) = T(n), triangular number, f(n) = n-th Bell, etc. each giving a distinct fascinating music.
%C A094290 The lexicographically earliest sequence such that no product of consecutive terms is a perfect square. - _Joshua Zucker_, Apr 30 2011
%H A094290 Antti Karttunen, <a href="/A094290/b094290.txt">Table of n, a(n) for n = 1..16384</a>
%F A094290 a(n) = A000040(A001511(n)). - _Omar E. Pol_, Sep 13 2013
%t A094290 Array[Prime[IntegerExponent[#, 2] + 1] &, 102] (* _Michael De Vlieger_, Nov 02 2018 *)
%o A094290 (PARI) A094290(n) = prime(1+valuation(n,2)); \\ _Antti Karttunen_, Nov 02 2018
%o A094290 (Python)
%o A094290 from sympy import prime
%o A094290 def A094290(n): return prime((~n & n-1).bit_length()+1) # _Chai Wah Wu_, Jul 02 2022
%Y A094290 Cf. A000040, A001511.
%Y A094290 Cf. also A115364.
%K A094290 nonn
%O A094290 1,1
%A A094290 _Amarnath Murthy_, Apr 28 2004
%E A094290 Replaced the name with a formula given by _Omar E. Pol_, which is equivalent to the original definition. - _Antti Karttunen_, Nov 02 2018