login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072205 a(n) = (p^2 - p + 2)/2 for p = prime(n); number of squares modulo p^2. 4
2, 4, 11, 22, 56, 79, 137, 172, 254, 407, 466, 667, 821, 904, 1082, 1379, 1712, 1831, 2212, 2486, 2629, 3082, 3404, 3917, 4657, 5051, 5254, 5672, 5887, 6329, 8002, 8516, 9317, 9592, 11027, 11326, 12247, 13204, 13862, 14879, 15932, 16291, 18146, 18529 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Second terms of triple Peano sequence A071988. [Robert G. Wilson v, Jul 03 2002]
Positions of primes in A075383: A000040(n) = A075383(a(n)). [Reinhard Zumkeller, Jun 22 2009]
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]
From Jianing Song, Apr 13 2019: (Start)
For k coprime to prime(n), k^a(n) == +-k (mod prime(n)^2).
For every integer k, k^(2a(n)) == k^2 (mod prime(n)^2). (End)
LINKS
FORMULA
a(n) = A008837(n) + 1.
a(n) = A000124(A000040(n)) by definition [Bert Seghers, Jan 01 2012]
MATHEMATICA
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
PROG
(Sage) [(p^2 - p + 2)/2 for p in prime_range(200)]
(PARI) a(n)=binomial(prime(n), 2)+1 \\ Charles R Greathouse IV, Jan 11 2012
CROSSREFS
Sequence in context: A018259 A018480 A004646 * A026531 A302916 A038047
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 03 2002
EXTENSIONS
Name edited by Bert Seghers, Jan 01 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 17:36 EDT 2024. Contains 371749 sequences. (Running on oeis4.)