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.

Previous Showing 11-19 of 19 results.

A277193 Number of integers k in range [n^2, ((n+1)^2)-1] for which 3 = the least number of squares that add up to k (A002828).

Original entry on oeis.org

0, 1, 1, 3, 4, 4, 6, 6, 8, 9, 9, 12, 11, 14, 15, 14, 17, 18, 19, 19, 23, 20, 24, 25, 25, 26, 29, 29, 30, 32, 32, 32, 36, 36, 37, 39, 41, 40, 42, 43, 45, 45, 47, 46, 50, 49, 50, 54, 52, 55, 56, 57, 60, 60, 63, 60, 62, 65, 68, 64, 67, 70, 72, 69, 73, 74, 75, 76, 78, 78, 80, 84, 79, 85, 84, 84, 88, 89, 90, 90, 91, 94, 94, 97, 94, 99
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2016

Keywords

Crossrefs

After the initial zero, one less than A277191.

Programs

  • Scheme
    (define (A277193 n) (add (lambda (i) (* (- 1 (A010052 i)) (- 1 (A229062 i)) (- 1 (A072401 i)))) (A000290 n) (+ -1 (A000290 (+ 1 n)))))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

Sum_{i=n^2 .. ((n+1)^2)-1} (1-A010052(i))*(1-A229062(i))*(1-A072401(i)).
Other identities. For all n >= 0:
1 + A077773(n) + a(n) + A277194(n) = 2n+1.
For n >= 1, a(n) = A277191(n)-1.

A277194 Number of integers k in range [n^2, ((n+1)^2)-1] for which 4 = the least number of squares that add up to k (A002828).

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 3, 2, 3, 4, 4, 4, 4, 5, 6, 5, 5, 6, 7, 6, 8, 8, 8, 8, 8, 8, 10, 9, 10, 11, 11, 10, 11, 11, 12, 11, 13, 14, 13, 13, 13, 15, 15, 15, 15, 16, 16, 15, 17, 17, 17, 17, 17, 19, 19, 18, 19, 19, 21, 20, 21, 21, 22, 21, 21, 22, 23, 22, 23, 23, 25, 23, 24, 26, 25, 26, 26, 26, 27, 26, 27, 27, 28, 29, 28, 29, 30, 29, 30, 30, 31
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2016

Keywords

Crossrefs

Programs

  • Scheme
    (define (A277194 n) (add A072401 (A000290 n) (+ -1 (A000290 (+ 1 n)))))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{i=n^2 .. ((n+1)^2)-1} A072401(i).
Other identities.
For n >= 0, 1 + A077773(n) + A277193(n) + a(n) = 2n+1.
For n >= 1, A277192(n) = A077773(n) + a(n).

A077768 Number of times that the sum of two squares is an integer between n^2 and (n+1)^2; multiple representations are counted multiply.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 6, 7, 7, 7, 8, 10, 10, 11, 11, 12, 13, 15, 15, 14, 18, 17, 17, 19, 19, 21, 20, 21, 23, 22, 26, 25, 26, 27, 25, 29, 27, 32, 30, 28, 33, 33, 36, 34, 33, 37, 36, 39, 38, 40, 39, 38, 42, 40, 46, 43, 45, 44, 46, 48, 47, 49, 50, 48, 50, 50, 53, 55, 52, 55, 53, 60, 57
Offset: 1

Views

Author

T. D. Noe, Nov 20 2002

Keywords

Comments

Related to the circle problem, cf. A077770. Note that 2*a(n)-A077770(n)/4 is the characteristic sequence for the Beatty sequence A001951. See A077769 for a more restrictive case. A077773 counts multiple representations only once.

Examples

			a(8)=7 because 65=64+1, 65=49+16, 68=64+4, 72=36+36, 73=64+9, 74=49+25 and 80=64+16 are between squares 64 and 81. Note that 65 occurs twice.
		

Crossrefs

Programs

  • Mathematica
    maxN=100; lst={}; For[n=1, n<=maxN, n++, cnt=0; i=n; j=0; While[i>=j, j=1; While[i^2+j^2<(n+1)^2, If[i>=j&&i^2+j^2>n^2, cnt++ ]; j++ ]; i--; j-- ]; AppendTo[lst, cnt]]; lst

A077774 Number of integers between n^2 and (n+1)^2 that are the sum of two coprime squares of opposite parity; multiple representations are counted once.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 2, 3, 4, 3, 3, 5, 4, 4, 5, 5, 5, 5, 6, 5, 5, 7, 6, 6, 6, 8, 7, 7, 8, 9, 8, 7, 8, 9, 7, 9, 10, 7, 11, 10, 9, 10, 13, 11, 8, 11, 12, 12, 11, 11, 13, 11, 13, 12, 12, 13, 13, 13, 14, 14, 13, 14, 13, 15, 13, 15, 14, 17, 15, 14, 17, 16, 16, 16, 17, 16, 18, 18, 16, 15
Offset: 1

Views

Author

T. D. Noe, Nov 20 2002

Keywords

Comments

See A077773 for a similar, but less restrictive sequence. A077769 counts multiple representations multiply.

Examples

			a(8)=2 because 65=64+1=49+16 and 73=64+9 are between squares 49 and 64. Note that 65 is counted only once.
		

Crossrefs

Programs

  • Mathematica
    maxN=100; lst={}; For[n=1, n<=maxN, n++, sqrs={}; i=n; j=0; While[i>=j, j=1; While[i^2+j^2<(n+1)^2, If[i>=j&&i^2+j^2>n^2&&GCD[i, j]==1&&OddQ[i]==EvenQ[j], AppendTo[sqrs, i^2+j^2]]; j++ ]; i--; j-- ]; AppendTo[lst, Length[Union[sqrs]]]]; lst

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

A364444 a(n) is the number of integers k with n^2 < k < (n+1)^2 that are the sum of no more than 3 squares, counting multiple representations only once.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 10, 11, 14, 15, 16, 18, 20, 22, 23, 24, 27, 29, 30, 31, 34, 34, 36, 38, 40, 42, 44, 44, 47, 48, 49, 51, 54, 55, 57, 58, 61, 61, 62, 65, 67, 69, 69, 71, 73, 75, 76, 78, 81, 81, 83, 85, 87, 89, 89, 91, 94, 95, 97, 97, 100, 101, 103, 104, 107, 109
Offset: 0

Views

Author

Hugo Pfoertner, Aug 01 2023

Keywords

Crossrefs

Programs

  • PARI
    isA004215(n)= n\4^valuation(n, 4)%8==7 \\ after M. F. Hasler
    a364444(n) = sum (k=n^2+1, n^2+2*n, !isA004215(k))
    
  • Python
    def A364444(n): return sum(1 for k in range(n**2+1,(n+1)**2) if (m:=(~k&k-1).bit_length())&1 or (k>>m)&7<7) # Chai Wah Wu, Aug 01 2023

A364445 Complement of A364444.

Original entry on oeis.org

1, 4, 6, 9, 12, 13, 17, 19, 21, 25, 26, 28, 32, 33, 35, 37, 39, 41, 43, 45, 46, 50, 52, 53, 56, 59, 60, 63, 64, 66, 68, 70, 72, 74, 77, 79, 80, 82, 84, 86, 88, 90, 92, 93, 96, 98, 99, 102, 105, 106, 108, 112, 113, 116, 118, 119, 120, 123, 124, 127, 129, 132, 133
Offset: 1

Views

Author

Hugo Pfoertner, Aug 01 2023

Keywords

Comments

Compared to A364444, this sequence is what A363762 is to A077773.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A364445_gen(): # generator of terms
        a = 0
        for n in count(1):
            b = sum(1 for k in range(n**2+1,(n+1)**2) if (m:=(~k&k-1).bit_length())&1 or (k>>m)&7<7)
            yield from range(a+1,b)
            a = b
    A364445_list = list(islice(A364445_gen(),20)) # Chai Wah Wu, Aug 01 2023

A385754 Positive numbers not occurring in A384797.

Original entry on oeis.org

1, 6, 16, 20, 25, 30, 33, 41, 48, 53, 57, 59, 62, 67, 74, 75, 78, 86, 90, 93, 98, 100, 107, 110, 113, 114, 123, 128, 130, 135, 138, 142, 145, 151, 153, 157, 159, 162, 165, 168, 178, 183, 191, 202, 204, 211, 212, 220, 223, 229, 232, 245, 254, 255, 283, 286, 291, 301
Offset: 1

Views

Author

Hugo Pfoertner, Jul 08 2025

Keywords

Comments

This sequence is to A384797 what A363762 is to A077773.

Crossrefs

Previous Showing 11-19 of 19 results.