The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A112049 a(n) = position of A112046(n) in A000040. 17
 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 4, 3, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 4, 5, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 6, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 4, 3, 1, 1, 2, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS A112051 gives the first positions of distinct new values in this sequence, that seem also to be the positions of the first occurrence of each n, and thus the positions of the records. Compare also to A084921. - Antti Karttunen, May 26 2017 LINKS Indranil Ghosh (terms 1..1000) & Antti Karttunen, Table of n, a(n) for n = 1..32768 FORMULA a(n) = A049084(A112046(n)). MATHEMATICA a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; a049084[n_]:=If[PrimeQ[n], PrimePi[n], 0]; Table[a049084[a112046[n]], {n, 102}] (* Indranil Ghosh, May 11 2017 *) PROG (PARI) A112049(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(primepi(i)))); \\ Antti Karttunen, May 26 2017 (Python) from sympy import jacobi_symbol as J, isprime, primepi def a049084(n): return primepi(n) if isprime(n) else 0 def a112046(n): i=1 while True: if J(i, 2*n + 1)!=1: return i else: i+=1 def a(n): return a049084(a112046(n)) print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017 CROSSREFS Cf. A049084, A112046, A112051, A112060, A165471, A268829, A286465, A286466. Cf. A286579 (ordinal transform). Sequence in context: A293681 A293773 A071017 * A055230 A290262 A112050 Adjacent sequences: A112046 A112047 A112048 * A112050 A112051 A112052 KEYWORD nonn AUTHOR Antti Karttunen, Aug 27 2005 EXTENSIONS Unnecessary fallback-clause removed from the name by Antti Karttunen, May 26 2017 STATUS approved

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.

Last modified October 3 09:32 EDT 2023. Contains 365854 sequences. (Running on oeis4.)