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.

Showing 1-5 of 5 results.

A286453 Compound filter: a(n) = P(A061395(n), A286465(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 2, 5, 11, 94, 5, 14, 254, 17, 9, 195, 47, 259, 500, 9, 11, 413, 138, 44, 303, 32, 20, 2784, 47, 354, 216, 5, 329, 506, 9, 77, 3161, 356, 35, 175, 107, 202, 2709, 216, 24, 11188, 14, 420, 356, 24, 285, 450, 498, 70, 2349, 35, 51, 115937, 5, 20, 329, 74, 310, 3420, 864, 1243, 336, 500, 11, 384, 20, 580, 47285, 87, 14, 615, 498, 1296, 3015, 9, 74, 3491, 216
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A061395(n)+A286465(n))^2) - A061395(n) - 3*A286465(n)).

A112046 a(n) = the least k >= 1 for which the Jacobi symbol J(k,2n+1) is not +1 (thus is either 0 or -1).

Original entry on oeis.org

2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 7, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 11, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 13, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

If we instead list the least k >= 1, for which Jacobi symbol J(k,2n+1) is 0, we get A090368.
It is easy to see that every term is prime. Because the Jacobi symbol is multiplicative as J(ab,m) = J(a,m)*J(b,m) and if for every index i>=1 and < x, J(i,m)=1, then if J(x,m) is 0 or -1, x cannot be composite (say y*z, with both y and z less than x), as then either J(y,m) or J(z,m) would be non-one, which contradicts our assumption that x is the first index where non-one value appears. Thus x must be prime.

Crossrefs

One more than A112050.
Bisections: A112047, A112048, and their difference: A112053.

Programs

  • PARI
    A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ Antti Karttunen, May 26 2017
    
  • Python
    from sympy import jacobi_symbol as J
    def a(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017

Formula

a(n) = A112050(n) + 1 = A000040(A112049(n)).

A112049 a(n) = position of A112046(n) in A000040.

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

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

Crossrefs

Cf. A286579 (ordinal transform).

Programs

  • 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 *)
  • 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

Formula

a(n) = A049084(A112046(n)).

Extensions

Unnecessary fallback-clause removed from the name by Antti Karttunen, May 26 2017

A286466 Compound filter: a(n) = P(A112049(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, May 10 2017

Keywords

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).

Crossrefs

Programs

  • 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)));
    
  • 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
  • Scheme
    (define (A286466 n) (* (/ 1 2) (+ (expt (+ (A112049 n) (A046523 n)) 2) (- (A112049 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A286461 Compound filter (2-adic valuation of n & 4k+1,4k+3 prime-signature combination of 2n-1): a(n) = P(A001511(n), A286364((2*n)-1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 4, 9, 22, 5, 4, 32, 4, 5, 121, 9, 46, 437, 4, 20, 121, 17, 4, 24, 4, 5, 67, 14, 22, 17, 4, 24, 121, 5, 4, 2562, 211, 5, 121, 9, 4, 107, 121, 14, 7261, 5, 211, 24, 4, 17, 121, 41, 4, 2280, 4, 9, 254, 5, 4, 32, 4, 17, 67, 24, 22, 17, 631, 35, 121, 5, 121, 783, 4, 5, 121, 32, 211, 2280, 4, 9, 67, 17, 4, 41, 121, 5, 254, 9, 46, 2280, 4, 140, 121, 5, 4, 24
Offset: 1

Views

Author

Antti Karttunen, May 10 2017

Keywords

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A286364((2*n)-1))^2) - A001511(n) - 3*A286364((2*n)-1)).
Showing 1-5 of 5 results.