|
|
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.
|
|
6
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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).
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI)
A112049(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(primepi(i))));
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
for(n=1, 10000, write("b286465.txt", n, " ", A286465(n)));
(Python)
from sympy import jacobi_symbol as J, factorint, isprime, primepi
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def a278223(n): return a046523(2*n - 1)
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
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 a112049(n): return a049084(a112046(n))
def a(n): return 1 if n==1 else T(a112049(n - 1), a278223(n)) # Indranil Ghosh, May 11 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|