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.

A384798 Records in A384797.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 12, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 28, 31, 34, 37, 38, 39, 40, 42, 44, 49, 51, 56, 58, 64, 69, 71, 73, 77, 79, 82, 92, 94, 101, 104, 108, 109, 111, 116, 118, 120, 129, 136, 140, 141, 155, 160, 172, 174, 181, 190, 193, 194, 208, 209
Offset: 1

Views

Author

Hugo Pfoertner, Jun 17 2025

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A384798_gen(): # generator of terms
        s, m = {0}, 1
        for n in count(1):
            c = n+1
            for i in range(n+1):
                if (k:=n**2+i**2) in s:
                    c -= 1
                else:
                    s.add(k)
            if c>m:
                yield c
                m = c
    A384798_list = list(islice(A384798_gen(),30)) # Chai Wah Wu, Jul 07 2025

A384799 Positions of records in A384797.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 22, 24, 27, 28, 30, 33, 35, 36, 40, 45, 48, 52, 54, 55, 56, 60, 65, 70, 78, 80, 90, 95, 100, 105, 108, 110, 120, 130, 135, 140, 150, 155, 156, 160, 165, 168, 180, 190, 200, 205, 210, 225, 240, 255, 260, 270, 280, 285, 300
Offset: 1

Views

Author

Hugo Pfoertner, Jun 17 2025

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A384799_gen(): # generator of terms
        s, m = {0}, 1
        for n in count(1):
            c = n+1
            for i in range(n+1):
                if (k:=n**2+i**2) in s:
                    c -= 1
                else:
                    s.add(k)
            if c>m:
                yield n
                m = c
    A384799_list = list(islice(A384799_gen(),30)) # Chai Wah Wu, Jul 07 2025

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

A047800 Number of different values of i^2 + j^2 for i,j in [0, n].

Original entry on oeis.org

1, 3, 6, 10, 15, 20, 27, 34, 42, 51, 61, 71, 83, 94, 106, 120, 135, 148, 165, 180, 198, 216, 235, 252, 273, 294, 315, 337, 360, 382, 408, 431, 457, 484, 508, 536, 567, 595, 624, 653, 687, 715, 749, 781, 813, 850, 884, 919, 957, 993, 1031, 1069, 1108, 1142
Offset: 0

Views

Author

Keywords

Comments

a(n-1) is the number of distinct distances on an n X n pegboard. What is its asymptotic growth? Can it be efficiently computed for large n? - Charles R Greathouse IV, Jun 13 2013
Conjecture (after Landau and Erdős): a(n) ~ c * n^2 / sqrt(log(n)), where c = 0.79... . - Vaclav Kotesovec, Mar 10 2016

Crossrefs

Programs

  • Haskell
    import Data.List (nub)
    a047800 n = length $ nub [i^2 + j^2 | i <- [0..n], j <- [i..n]]
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Mathematica
    Table[ Length@Union[ Flatten[ Table[ i^2+j^2, {i, 0, n}, {j, 0, n} ] ] ], {n, 0, 49} ]
    nmax = 100; sq = Table[i^2 + j^2, {i, 0, nmax}, {j, 0, nmax}]; Table[Length@Union[Flatten[Table[Take[sq[[j]], n + 1], {j, 1, n + 1}]]], {n, 0, nmax}] (* Vaclav Kotesovec, Mar 09 2016 *)
  • PARI
    a(n) = n++; #vecsort(vector(n^2, i, ((i-1)\n)^2+((i-1)%n)^2), , 8) \\ Charles R Greathouse IV, Jun 13 2013; edited by Michel Marcus, Jul 06 2025
    
  • PARI
    a(n) = #setbinop((i,j)->i^2+j^2, [0..n]); \\ Michel Marcus, Jul 07 2025
    
  • Python
    def A047800(n): return len(set(i**2+j**2 for i in range(n+1) for j in range(i+1))) # Chai Wah Wu, Jul 07 2025
Showing 1-4 of 4 results.