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-4 of 4 results.

A363762 Numbers k for which A363763(k) = -1.

Original entry on oeis.org

46, 55, 62, 71, 80, 86, 107, 130, 172, 187, 195, 208, 222, 247, 259, 263, 268, 272, 280, 297, 314, 330, 358, 363, 370, 372, 379, 394, 400, 405, 429, 449, 450, 462, 489, 500, 529, 534, 587, 629, 641, 646, 652, 667, 668, 672, 704, 715, 733, 736, 749, 769, 775, 776, 778, 785, 793, 799
Offset: 1

Views

Author

Hugo Pfoertner, Jun 20 2023

Keywords

Crossrefs

Numbers not occurring as terms of A077773.

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A363762_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for k in range(n>>1,((n+1)**2<<1)+1):
                c = 0
                for m in range(k**2+1,(k+1)**2):
                    if all(p==2 or p&3==1 or e&1^1 for p, e in factorint(m).items()):
                        c += 1
                        if c>n:
                            break
                if c==n:
                    break
            else:
                yield n
    A363762_list = list(islice(A363762_gen(),20)) # Chai Wah Wu, Jun 22 2023

A363763 a(n) is the least k such that there are exactly n distinct numbers j that can be expressed as the sum of two squares with k^2 < j < (k+1)^2, or -1 if such a k does not exist.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 13, 12, 15, 17, 19, 23, 21, 24, 25, 28, 32, 31, 34, 37, 39, 44, 41, 43, 45, 50, 51, 48, 57, 55, 56, 59, 64, 63, 68, 69, 74, 77, 78, 75, 72, 80, 88, 84, -1, 94, 89, 96, 93, 99, 97, 102, 108, -1, 106, 111, 110, 113, 117, 120, -1, 123, 133, 127, 130, 137, 142, 138, 139, -1, 135
Offset: 0

Views

Author

Hugo Pfoertner, Jun 20 2023

Keywords

Comments

Index of first occurrence of n in A077773 if there is any, otherwise -1. - Rainer Rosenthal, Jul 07 2023

Examples

			From _Rainer Rosenthal_, Jul 09 2023: (Start)
a(5) = 7, since A077773(7) = 5 and A077773(n) != 5 for n < 7.
a(46) = -1, since a(46) < ((46+1)^2)/2 < 1105 and A077773(k) != 46 for all k < 1105.
See illustrations in the links section. (End)
		

Crossrefs

A363762 gives the positions of terms = -1.
Identical with A363761 up to a(11459) = 33864, but increasingly different afterwards, i.e., a(11460) = 34451, whereas A363761(11460) = -1.

Programs

  • PARI
    \\ a4018(n) after Michael Somos
    a4018(n) = if( n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3)));
    a363763 (upto) = {for (n=0, upto, my(kfound=-1); for (k=0, (n+1)^2\2+1, my(kp=k^2+1, km=(k+1)^2-1, m=0); for (j=kp, km, if (a4018(j), m++); if (m>n, break)); if (m==n, kfound=k; break)); print1 (kfound,", ");)};
    a363763(75)
    
  • Python
    from sympy import factorint
    def A363763(n):
        for k in range(n>>1,((n+1)**2<<1)+1):
            c = 0
            for m in range(k**2+1,(k+1)**2):
                if all(p==2 or p&3==1 or e&1^1 for p, e in factorint(m).items()):
                    c += 1
                    if c>n:
                        break
            if c==n:
                return k
        return -1 # Chai Wah Wu, Jun 20-26 2023

Formula

If a(n) != -1, then a(n) >= n/2. - Chai Wah Wu, Jun 22 2023
a(n) < (n+1)^2/2. - Jon E. Schoenfield and Chai Wah Wu, Jun 24-26 2023

A363522 Number of integers k such that there are exactly n distinct numbers j with k^2 < j < (k+1)^2 which can be expressed as sum of two squares.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 3, 2, 1, 1, 3, 2, 2, 1, 3, 3, 1, 3, 1, 2, 1, 4, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 3, 2, 1, 1, 4, 1, 4, 2, 3, 0, 2, 3, 3, 3, 2, 2, 2, 1, 0, 3, 5, 1, 4, 1, 4, 0, 2, 2, 3, 4, 1, 1, 3, 3, 0, 5, 1, 4, 1, 2, 1, 3, 4, 0, 3, 3, 2, 2, 4, 0, 3
Offset: 0

Views

Author

Rainer Rosenthal, Jul 07 2023

Keywords

Comments

Number of occurrences of n in A077773.

Examples

			a(0) = 1, since A077773(k) = 0 at the single index k = 0.
a(6) = 3, since A077773(k) = 6 for these 3 indices: k = 8, 9, and 11.
a(46) = 0, since A077773 doesn't contain 46; see A363761, A363762 and A363763.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    def A363522(n):
        s = 0
        for k in range(n>>1,((n+1)**2<<1)+1):
            c = 0
            for m in range(k**2+1,(k+1)**2):
                if all(p==2 or p&3==1 or e&1^1 for p, e in factorint(m).items()):
                    c += 1
                    if c>n:
                        break
            if c==n:
                s += 1
        return s # Chai Wah Wu, Jul 10 2023

A364341 a(n) is the greatest k such that there are exactly n distinct numbers j that can be expressed as the sum of two squares with k^2 < j < (k+1)^2, or -1 if such a k does not exist.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 11, 10, 14, 12, 16, 20, 22, 23, 21, 27, 29, 30, 32, 35, 38, 37, 42, 44, 47, 43, 54, 52, 51, 58, 57, 62, 56, 71, 64, 67, 68, 73, 76, 77, 78, 83, 72, 87, 90, 91, -1, 95, 103, 100, 107, 109, 105, 104, 108, -1, 116, 119, 110, 129, 117, 126, -1, 128, 134
Offset: 0

Views

Author

Rainer Rosenthal, Jul 20 2023

Keywords

Comments

Index of last occurrence of n in A077773 if there is any, otherwise -1.

Crossrefs

Showing 1-4 of 4 results.