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.

A350493 a(n) = floor(sqrt(prime(n)))^2 mod n.

This page as a plain text file.
%I A350493 #12 Jan 18 2022 21:48:50
%S A350493 0,1,1,0,4,3,2,0,7,5,3,0,10,8,6,1,15,13,7,4,1,20,12,9,6,22,19,16,13,
%T A350493 10,28,25,22,19,4,0,33,30,27,9,5,1,40,37,16,12,8,4,29,25,21,17,13,9,
%U A350493 36,32,28,24,20,16,12,41,37,33,29,25,56,52,48,44,40,36
%N A350493 a(n) = floor(sqrt(prime(n)))^2 mod n.
%F A350493 a(n) = A065730(n) mod n.
%e A350493 a(4) = A065730(4) mod 4 =  4 mod 4 = 0;
%e A350493 a(5) = A065730(5) mod 5 =  9 mod 5 = 4;
%e A350493 a(6) = A065730(6) mod 6 =  9 mod 6 = 3;
%e A350493 a(7) = A065730(7) mod 7 = 16 mod 7 = 2.
%t A350493 Table[PowerMod[Floor[Sqrt[Prime[n]]],2,n],{n,72}] (* _Stefano Spezia_, Jan 02 2022 *)
%o A350493 (PARI) a(n) = (sqrtint(prime(n))^2) % n;
%o A350493 vector(20,n,a(n))
%o A350493 (Ruby) require 'prime'
%o A350493 values = []
%o A350493 Prime.first(20).each_with_index do |prime, i|
%o A350493     values << ((Integer.sqrt(prime) ** 2) % (i + 1))
%o A350493 end
%o A350493 p values
%o A350493 (Python)
%o A350493 from sympy import prime, integer_nthroot
%o A350493 def a(n): return (integer_nthroot(prime(n), 2)[0]**2)%n
%o A350493 print([a(n) for n in range(1, 73)]) # _Michael S. Branicky_, Jan 02 2022
%Y A350493 Cf. A000040, A048760, A065730.
%K A350493 nonn
%O A350493 1,5
%A A350493 _Simon Strandgaard_, Jan 01 2022