login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286466 Compound filter: a(n) = P(A112049(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function. 4
1, 2, 5, 12, 2, 16, 5, 38, 7, 16, 9, 94, 2, 16, 23, 138, 2, 67, 5, 80, 16, 16, 9, 355, 7, 16, 38, 80, 2, 436, 5, 530, 16, 16, 40, 706, 2, 16, 23, 302, 2, 436, 5, 80, 67, 16, 9, 1228, 7, 67, 23, 80, 2, 277, 23, 302, 16, 16, 14, 2021, 2, 16, 80, 2082, 16, 436, 5, 80, 16, 436, 9, 2704, 2, 16, 80, 80, 16, 436, 5, 1178, 121, 16, 9, 2086, 16, 16, 23, 302, 2, 1771 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Here the information combined together to a(n) consists of A046523(n), giving essentially the prime signature of n, 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).

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = (1/2)*(2 + ((A112049(n)+A046523(n))^2) - A112049(n) - 3*A046523(n)).

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

A286466(n) = (1/2)*(2 + ((A112049(n)+A046523(n))^2) - A112049(n) - 3*A046523(n));

for(n=1, 10000, write("b286466.txt", n, " ", A286466(n)));

(Scheme) (define (A286466 n) (* (/ 1 2) (+ (expt (+ (A112049 n) (A046523 n)) 2) (- (A112049 n)) (- (* 3 (A046523 n))) 2)))

(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 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 T(a112049(n), a046523(n)) # Indranil Ghosh, May 11 2017

CROSSREFS

Cf. A000027, A046523, A112049, A286258, A286465.

Sequence in context: A341804 A109623 A317406 * A127532 A127530 A279347

Adjacent sequences:  A286463 A286464 A286465 * A286467 A286468 A286469

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 10 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 12:01 EDT 2021. Contains 343971 sequences. (Running on oeis4.)