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.

User: Jeongseop Lee

Jeongseop Lee's wiki page.

Jeongseop Lee has authored 1 sequences.

A350740 Number of integer points (x, y, z, w) at distance <= 1/2 from 3-sphere of radius n.

Original entry on oeis.org

1, 32, 200, 528, 1280, 2744, 4272, 6592, 10144, 15048, 19824, 25824, 34744, 43520, 55184, 64680, 80864, 99184, 115616, 135144, 157344, 185872, 207304, 239600, 272960, 310240, 351096, 385392, 433040, 485528, 531728, 583696, 646056, 714800, 779488, 842928
Offset: 0

Author

Jeongseop Lee, Jan 12 2022

Keywords

Crossrefs

A 4-dimensional version of A016728.
Cf. A046895.

Programs

  • Maple
    N:= 40: # for a(0)..a(N)
    V:= Array(0..N):
    for x from 0 to N do
      for y from x to N do
        for z from y to N do
          for w from z to N do
            S:= {x,y,z,w};
            L:= [x,y,z,w];
            m:= round(sqrt(x^2 + y^2 + z^2 + w^2));
            if m > N then next fi;
            f:= 4!/mul(numboccur(s,L)!, s = S) * 2^(4 - numboccur(0,[x,y,z,w]));
            V[m]:= V[m] + f;
    od od od od;
    convert(V,list); # Robert Israel, Mar 08 2024
  • Python
    from itertools import product
    for R in range(100):
        c = 0
        for s in product(range(2*R + 1), repeat = 4):
            if (2*R - 1)**2 <= 4*sum((i - R)**2 for i in s) <= (2*R + 1)**2: c += 1
        print(c if R != 0 else 1, end = ', ')
    
  • Python
    from itertools import combinations_with_replacement
    from math import prod
    from collections import Counter
    def A350740(n):
        if n == 0: return 1
        x, y = (2*n-1)**2, (2*n+1)**2
        return sum(24//prod((1,1,2,6,24)[d] for d in q.values())<<4-q[0] for q in map(Counter,combinations_with_replacement(range(n+1),4)) if x <= sum(b*a**2 for a, b in q.items())<<2 <= y) # Chai Wah Wu, Jun 20 2024
    
  • Python
    # Uses Python code in A046895
    def A350740(n): return A046895(n*(n+1))-A046895(n*(n-1)) if n else 1 # Chai Wah Wu, Jun 21 2024

Formula

a(n) = A046895(n^2+n)-A046895(n^2-n) for n > 0. - Chai Wah Wu, Jun 21 2024