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.

A337110 Number of length three 1..n vectors that contain their geometric mean.

This page as a plain text file.
%I A337110 #42 Jan 02 2023 09:00:42
%S A337110 1,2,3,10,11,12,13,20,33,34,35,42,43,44,45,64,65,78,79,86,87,88,89,96,
%T A337110 121,122,135,142,143,144,145,164,165,166,167,198,199,200,201,208,209,
%U A337110 210,211,218,231,232,233,252,289,314,315,322,323,336,337,344,345,346
%N A337110 Number of length three 1..n vectors that contain their geometric mean.
%C A337110 From _David A. Corneth_, Aug 26 2020: (Start)
%C A337110 If x^2 == 0 (mod n) has only 1 solution then a(n) = a(n-1) + 1. Proof:
%C A337110 Let (a, b, n) be such a tuple. Let without loss of generality b be the geometric mean of the tuple. Then a*b*n = b^3 and as b is not 0 we have b^2 = a*n. So then b^2 == 0 (mod n). If b^2 == 0 (mod n) has only 1 solution then b = n. This gives the tuple (n, n, n) which has 1 permutation. So giving a(n) = a(n-1) + 1. (End)
%H A337110 Hywel Normington, <a href="https://github.com/Horep/Number-of-vectors-that-contain-their-average/blob/master/A337110.py">Python code</a>, 2020.
%H A337110 Hywel Normington, <a href="https://github.com/Horep/Number-of-vectors-that-contain-their-average/blob/master/Julia_Edition/A337110.jl">Julia code</a>, 2023.
%F A337110 a(n) = a(n-1) + 1 + 6*A057918(n).
%e A337110 For n = 2, the a(2) = 2 solutions are: (1,1,1) and (2,2,2).
%e A337110 For n = 4, the a(4) = 10 solutions are: (1,1,1),(2,2,2),(3,3,3),(4,4,4) and the 6 permutations of (1,2,4).
%o A337110 (PARI) first(n) = {my(s = 0, res = vector(n)); for(i = 1, n, s+=b(i); res[i] = s ); res }
%o A337110 b(n) = { my(s = factorback(factor(n)[, 1]), res = 1); for(i = 1, n \ s - 1, c = (s*i)^2/n; if(denominator(c) == 1 && c <= n, res+=6; ) ); res } \\ _David A. Corneth_, Aug 26 2020
%Y A337110 Cf. A120486, A248434, A337111, A013929, A057918, A000188.
%K A337110 nonn,easy
%O A337110 1,2
%A A337110 _Hywel Normington_, Aug 16 2020