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.

A318909 a(n) = Product_{1<=x<=n, n|(x^2-1)} x.

This page as a plain text file.
%I A318909 #17 Nov 05 2019 00:57:16
%S A318909 1,1,2,3,4,5,6,105,8,9,10,385,12,13,616,945,16,17,18,1881,2080,21,22,
%T A318909 37182145,24,25,26,5265,28,6061,30,7905,7360,33,5916,11305,36,37,
%U A318909 13300,1384944561,40,15457,42,20769,21736,45,46,4087504225,48,49,28000,34425
%N A318909 a(n) = Product_{1<=x<=n, n|(x^2-1)} x.
%C A318909 a(n) is the product of self-inverse elements in (Z/nZ)*, where (Z/nZ)* is the multiplicative group of integers modulo n.
%C A318909 For n >= 2, a(n) = n - 1 iff n is in A033948. For other n, a(n) == 1 (mod n). This can also be written as: a(n) == (-1)^A034380(n) == (-1)^(A060594(n)/2) (mod n) for n >= 3.
%C A318909 More generally, let P(k,n) = Product_{1<=x<=n, n|(x^k-1)} x, then P(k,n) == 1 (mod n) if k is odd or n is not in A033948, P(k,n) == -1 (mod n) otherwise. Equivalently, if A046072(n) > 1 then P(k,n) == 1 (mod n), otherwise P(k,n) == (-1)^((k+1)/2) (mod n).
%H A318909 Robert Israel, <a href="/A318909/b318909.txt">Table of n, a(n) for n = 1..10000</a>
%e A318909 For n = 8, 1^2 == 3^2 == 5^2 == 7^2 == 1 (mod 8) so a(8) = 1*3*5*7 = 105.
%e A318909 For n = 12, 1^2 == 5^2 == 7^2 == 11^2 == 1 (mod 12) so a(12) = 1*5*7*11 = 385.
%p A318909 f:= proc(n) convert(map(t -> rhs(op(t)),[msolve(x^2=1,n)]),`*`) end proc:
%p A318909 f(1):= 1:
%p A318909 map(f, [$1..100]); # _Robert Israel_, Nov 05 2019
%o A318909 (PARI) a(n) = prod(i=1, n, i^(Mod(i^2-1,n)==0))
%Y A318909 Cf. A033948, A034380, A046072, A060594.
%K A318909 nonn,look
%O A318909 1,3
%A A318909 _Jianing Song_, Sep 05 2018