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.
%I A286465 #11 May 11 2017 11:52:53 %S A286465 1,2,2,5,12,2,2,23,5,2,16,9,18,29,2,5,23,16,2,23,5,2,67,9,25,16,2,23, %T A286465 23,2,2,80,23,2,16,14,9,67,16,5,138,2,16,23,5,16,16,31,9,67,2,5,467,2, %U A286465 2,23,5,16,67,40,33,16,29,5,23,2,16,302,5,2,16,31,31,67,2,5,80,16,2,23,23,2,436,9,42,67,2,80,23,2,2,23,23,16,277,14,9,436,2,5 %N A286465 Compound filter: a(1) = 1, a(n) = P(A112049(n-1), A278223(n)), where P(n,k) is sequence A000027 used as a pairing function. %C A286465 After a(1) = 1, the information combined together to a(n) consists of A046523(2n-1), giving essentially the prime signature of 2n-1, and the index of the first prime p >= 1 for which the Jacobi symbol J(p,2n-1) is not +1 (i.e. is either 0 or -1), the value which is returned by A112049(n-1). %H A286465 Antti Karttunen, <a href="/A286465/b286465.txt">Table of n, a(n) for n = 1..10000</a> %F A286465 a(1) = 1; for n > 1, a(n) = (1/2)*(2 + ((A112049(n-1)+A046523((2*n)-1))^2) - A112049(n-1) - 3*A046523((2*n)-1)). %o A286465 (PARI) %o A286465 A112049(n) = for(i=1,(2*n),if((kronecker(i,(n+n+1)) < 1),return(primepi(i)))); %o A286465 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from _Charles R Greathouse IV_, Aug 17 2011 %o A286465 A286465(n) = if(1==n,n,(1/2)*(2 + ((A112049(n-1)+A046523((2*n)-1))^2) - A112049(n-1) - 3*A046523((2*n)-1))); %o A286465 for(n=1, 10000, write("b286465.txt", n, " ", A286465(n))); %o A286465 (Scheme) (define (A286465 n) (if (= 1 n) n (* (/ 1 2) (+ (expt (+ (A112049 (- n 1)) (A046523 (+ -1 n n))) 2) (- (A112049 (- n 1))) (- (* 3 (A046523 (+ -1 n n)))) 2)))) %o A286465 (Python) %o A286465 from sympy import jacobi_symbol as J, factorint, isprime, primepi %o A286465 def P(n): %o A286465 f = factorint(n) %o A286465 return sorted([f[i] for i in f]) %o A286465 def a046523(n): %o A286465 x=1 %o A286465 while True: %o A286465 if P(n) == P(x): return x %o A286465 else: x+=1 %o A286465 def a278223(n): return a046523(2*n - 1) %o A286465 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286465 def a049084(n): return primepi(n) if isprime(n) else 0 %o A286465 def a112046(n): %o A286465 i=1 %o A286465 while True: %o A286465 if J(i, 2*n + 1)!=1: return i %o A286465 else: i+=1 %o A286465 def a112049(n): return a049084(a112046(n)) %o A286465 def a(n): return 1 if n==1 else T(a112049(n - 1), a278223(n)) # _Indranil Ghosh_, May 11 2017 %Y A286465 Cf. A000027, A046523, A112049, A278223, A286461, A286466. %K A286465 nonn %O A286465 1,2 %A A286465 _Antti Karttunen_, May 10 2017