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.

A072205 a(n) = (p^2 - p + 2)/2 for p = prime(n); number of squares modulo p^2.

This page as a plain text file.
%I A072205 #26 Apr 19 2019 11:25:03
%S A072205 2,4,11,22,56,79,137,172,254,407,466,667,821,904,1082,1379,1712,1831,
%T A072205 2212,2486,2629,3082,3404,3917,4657,5051,5254,5672,5887,6329,8002,
%U A072205 8516,9317,9592,11027,11326,12247,13204,13862,14879,15932,16291,18146,18529
%N A072205 a(n) = (p^2 - p + 2)/2 for p = prime(n); number of squares modulo p^2.
%C A072205 Second terms of triple Peano sequence A071988. [_Robert G. Wilson v_, Jul 03 2002]
%C A072205 Positions of primes in A075383: A000040(n) = A075383(a(n)). [_Reinhard Zumkeller_, Jun 22 2009]
%C A072205 Number of different squares modulo p^2, for p ranging over the primes. Proof: the p multiples of p (0, p, 2p...) have the same square: 0 mod p^2. The other elements have the same square iff they are opposite: x^2 == y^2 (mod p^2) iff (x - y)(x + y) == 0 (mod p^2) iff x == y (mod p) or x == -y (mod p) or 2y == 0 (mod p). So the (p^2 - p) non-p-multiples account for (p^2 - p)/2 different squares and the p-multiples for 1 extra square, giving a total of (p^2 - p + 2)/2. [_Bert Seghers_, Dec 21 2011]
%C A072205 From _Jianing Song_, Apr 13 2019: (Start)
%C A072205 For k coprime to prime(n), k^a(n) == +-k (mod prime(n)^2).
%C A072205 For every integer k, k^(2a(n)) == k^2 (mod prime(n)^2). (End)
%F A072205 a(n) = A008837(n) + 1.
%F A072205 a(n) = A000124(A000040(n)) by definition [_Bert Seghers_, Jan 01 2012]
%t A072205 seq[n_Integer?Positive] := Module[{fn01 = 1, fn10 = 1, fnout = 1}, Do[{fn10, fn01, fnout} = {fn10 + 1, fn01 + fn10, fn01 + fnout}, {n - 1}]; {fn10, fn01, fnout}]; Ar = Flatten[ Table[ seq[ Prime[n]], {n, 1, 50}]]; a = {}; Do[a = Append[a, Ar[[n]]], {n, 2, 150, 3}]; a
%o A072205 (Sage) [(p^2 - p + 2)/2 for p in prime_range(200)]
%o A072205 (PARI) a(n)=binomial(prime(n),2)+1 \\ _Charles R Greathouse IV_, Jan 11 2012
%Y A072205 Cf. A008837, A071988, A075383.
%K A072205 nonn
%O A072205 1,1
%A A072205 _Robert G. Wilson v_, Jul 03 2002
%E A072205 Name edited by _Bert Seghers_, Jan 01 2012