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

A373042 a(n) is the number of 3-element subsets {x,y,z} of {1,...,n} such that x*y*z is a square.

Original entry on oeis.org

0, 0, 0, 1, 1, 4, 6, 8, 8, 13, 13, 15, 18, 23, 23, 35, 35, 44, 47, 50, 50, 62, 74, 77, 96, 107, 107, 117, 117, 145, 150, 154, 160, 182, 182, 186, 191, 211, 211, 223, 223, 236, 263, 267, 267, 304, 338, 390, 396, 412, 412, 457, 466, 492, 499, 504, 504, 536, 536, 541, 575
Offset: 3

Views

Author

Hugo Pfoertner, May 25 2024

Keywords

Examples

			a(6) = a(7) = 1: 2*3*6 = 36.
a(8) = 4: 1*2*8 = 16, 2*3*6 = 36, 2*4*8 = 64, 3*6*8 = 144.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=0); forsubset([n,3], s, if(issquare(vecprod(Vec(s))), k++)); k
    
  • Python
    from math import prod
    from itertools import combinations
    from sympy.ntheory.primetest import is_square
    def A373042(n): return sum(1 for p in combinations(range(1,n+1),3) if is_square(prod(p))) # Chai Wah Wu, May 30 2024
Showing 1-1 of 1 results.