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-10 of 16 results. Next

A112060 Square array A(x,y) = y-th natural number k for which A112049(k)=x and 0 if no such k exists; read by antidiagonals A(1,1), A(2,1), A(1,2), A(3,1), A(2,2), ...

Original entry on oeis.org

1, 2, 3, 5, 4, 11, 6, 7, 12, 24, 9, 8, 23, 35, 60, 10, 15, 36, 59, 155, 84, 13, 16, 47, 95, 275, 239, 144, 14, 19, 48, 119, 335, 575, 779, 180, 17, 20, 71, 120, 359, 659, 1499, 2855, 264, 18, 27, 72, 179, 419, 839, 1535, 4199, 5279, 420, 21, 28, 83, 204, 504
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

This is a permutation of natural numbers provided that the sequence A112046 contains only prime values [which is true] and every prime occurs infinitely many times there.

Examples

			The top left corner of the array:
   1,  2,  5,  6,  9, 10, ...
   3,  4,  7,  8, 15, 16, ...
  11, 12, 23, 36, 47, ...
		

Crossrefs

A112070(x, y) = 2*A(X, Y)+1. Transpose: A112061. Column 1: A112051. Row 1: A042963, Row 2: A112062, Row 3: A112063, Row 4: A112064, Row 5: A112065, Row 6: A112066, Row 7: A112067, Row 8: A112068, Row 9: A112069.
Cf. also A227196.

A112070 Square array A(x,y) = y-th odd number 2i+1 (i>=1) for which A112049(2i+1)=x, or 0 if no such i exists; read by descending antidiagonals.

Original entry on oeis.org

3, 5, 7, 11, 9, 23, 13, 15, 25, 49, 19, 17, 47, 71, 121, 21, 31, 73, 119, 311, 169, 27, 33, 95, 191, 551, 479, 289, 29, 39, 97, 239, 671, 1151, 1559, 361, 35, 41, 143, 241, 719, 1319, 2999, 5711, 529, 37, 55, 145, 359, 839, 1679, 3071, 8399, 10559, 841, 43, 57
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

This is a permutation of odd numbers greater than unity provided that the sequence A112046 contains only prime values and every prime occurs infinitely many times there. Because the Jacobi symbol is multiplicative with respect to its modulus, it follows that if n occurs on row i and m occurs on row j, then n*m cannot occur before row min(i,j).

Examples

			The top left corner of the array:
3,5,11,13,19,21,...
7,9,15,17,31,33,...
23,25,47,73,95,...
		

Crossrefs

A(x, y) = 2*A112060(x, y)+1. Transpose: A112071. Column 1: A112052. Row 1: A047621, Row 2: A112072 Row 3: A112073, Row 4: A112074, Row 5: A112075, Row 6: A112076, Row 7: A112077, Row 8: A112078, Row 9: A112079.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 10 2017

Keywords

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

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

Formula

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

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

A112062 Positive integers i for which A112049(i) == 2.

Original entry on oeis.org

3, 4, 7, 8, 15, 16, 19, 20, 27, 28, 31, 32, 39, 40, 43, 44, 51, 52, 55, 56, 63, 64, 67, 68, 75, 76, 79, 80, 87, 88, 91, 92, 99, 100, 103, 104, 111, 112, 115, 116, 123, 124, 127, 128, 135, 136, 139, 140, 147, 148, 151, 152, 159, 160, 163, 164, 171, 172, 175, 176
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 2 of A112060.

A112063 Positive integers i for which A112049(i) == 3.

Original entry on oeis.org

11, 12, 23, 36, 47, 48, 71, 72, 83, 96, 107, 108, 131, 132, 143, 156, 167, 168, 191, 192, 203, 216, 227, 228, 251, 252, 263, 276, 287, 288, 311, 312, 323, 336, 347, 348, 371, 372, 383, 396, 407, 408, 431, 432, 443, 456, 467, 468, 491, 492, 503, 516, 527
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 3 of A112060.

A112064 Positive integers n for which A112049(n) == 4.

Original entry on oeis.org

24, 35, 59, 95, 119, 120, 179, 204, 215, 240, 299, 300, 324, 360, 384, 395, 444, 455, 479, 515, 539, 540, 599, 624, 635, 660, 719, 720, 744, 780, 804, 815, 864, 875, 899, 935, 959, 960, 1019, 1044, 1055, 1080, 1139, 1140, 1164, 1200, 1224, 1235, 1284
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 4 of A112060.

A112065 Positive integers i for which A112049(i) == 5.

Original entry on oeis.org

60, 155, 275, 335, 359, 419, 504, 564, 600, 695, 755, 900, 984, 995, 1020, 1079, 1115, 1199, 1259, 1260, 1415, 1440, 1524, 1595, 1619, 1679, 1680, 1824, 1919, 1944, 2015, 2039, 2100, 2184, 2255, 2280, 2339, 2364, 2435, 2519, 2580, 2604
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 5 of A112060.

A112066 Positive integers i for which A112049(i) == 6.

Original entry on oeis.org

84, 239, 575, 659, 839, 1175, 1320, 1344, 1764, 1835, 1955, 2099, 2160, 2375, 2459, 2759, 2784, 2879, 3084, 3299, 3515, 3695, 3779, 3780, 3840, 3935, 4139, 4439, 4475, 4620, 4764, 4800, 4859, 4884, 5040, 5544, 5795, 5964, 6024, 6119, 6155
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 6 of A112060.

A112067 Positive integers i for which A112049(i) == 7.

Original entry on oeis.org

144, 779, 1499, 1535, 3215, 3275, 4044, 4355, 4380, 4535, 5459, 5460, 6864, 6995, 7284, 7379, 7499, 7704, 8315, 8399, 9059, 9420, 9504, 10079, 10164, 10560, 10775, 10980, 11075, 11699, 11760, 11999, 12024, 12455, 12935, 13715, 13775, 14040
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Row 7 of A112060.
Showing 1-10 of 16 results. Next