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.

Showing 1-10 of 13 results. Next

A076342 a(n) = A076340(A000040(n)), real part of primes mapped as defined in A076340, A076341.

Original entry on oeis.org

2, 4, 4, 8, 12, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 60, 60, 68, 72, 72, 80, 84, 88, 96, 100, 104, 108, 108, 112, 128, 132, 136, 140, 148, 152, 156, 164, 168, 172, 180, 180, 192, 192, 196, 200, 212, 224, 228, 228, 232, 240, 240, 252, 256, 264, 268, 272
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Comments

By definition of the map defined in A076340, A076341: 2->(2,0) and p->((floor(p/4)+floor((p mod 4)/2))*4,2-(p mod 4)) for odd primes p.
Number of solutions to x^2 + y^2 = 1 (mod p). - Lekraj Beedassy, Oct 22 2004

Examples

			A000040(11)=31=(32-1) -> (32,-1), therefore a(11)=32 and A070750(11)=-1.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
      p:= ithprime(n);
      if p mod 4 = 1 then p-1 elif p mod 4 = 3 then p+1 else 2 fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 26 2016
  • Mathematica
    a[1] = 2; a[n_] := With[{p = Prime[n]}, p - JacobiSymbol[-1, p]]; Array[a, 60] (* Jean-François Alcover, Feb 01 2018, after Lekraj Beedassy *)
    a[n_] := Prime[n] - 2 + Mod[Prime[n], 4]; Array[a, 100] (* Amiram Eldar, Dec 24 2022 *)

Formula

a(n) = p-(-1/p) = p+(-1)^{(p+1)/2} for an odd prime p. {(a/b) stands for the value of the Legendre symbol}. - Lekraj Beedassy, Oct 22 2004
From Amiram Eldar, Dec 24 2022: (Start)
a(n) = A000040(n) - A070750(n).
a(n) = A100484(n) - A082542(n).
Product_{n>=1} a(n)/prime(n) = 4/Pi (A088538). (End)

A076348 A076341(A005117(n)), imaginary part of squarefree numbers mapped as defined in A076340, A076341.

Original entry on oeis.org

0, 0, -1, 1, -2, -1, 2, -1, 1, -2, 0, 1, -1, -12, -2, -1, 2, 1, 0, -1, -16, 2, 4, 1, -2, -8, 1, -24, -1, -2, -1, -12, 1, 8, -24, 2, -1, 1, -2, 16, -32, -1, -28, 8, -1, 1, 2, -20, -16, -1, 2, -1, 20, -2, -24, 1, -4, -36, -2, 16, 1, 1, -24, -1, -17, 2, -1, 1, 16, -32, 1, -48, 20, -2, -8
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A005117(40)=65=5*13=(4+1)*(12+1) -> (4,1)*(12,1) = (4*12-1,12+4) = (47,16), therefore a(40)=16 and A076347(40)=47.
		

Crossrefs

A076347 A076340(A005117(n)), real part of squarefree numbers mapped as defined in A076340, A076341.

Original entry on oeis.org

1, 2, 4, 4, 8, 8, 8, 12, 12, 16, 17, 16, 20, 31, 24, 24, 24, 28, 34, 32, 47, 32, 33, 36, 40, 49, 40, 62, 44, 48, 48, 65, 52, 49, 79, 56, 60, 60, 64, 47, 94, 68, 95, 66, 72, 72, 72, 95, 98, 80, 80, 84, 63, 88, 113, 88, 97, 127, 96, 81, 96, 100, 130, 104, 136, 104, 108, 108
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A005117(40)=65=5*13=(4+1)*(12+1) -> (4,1)*(12,1) = (4*12-1,12+4) = (47,16), therefore a(40)=47 and A076348(40)=16.
		

Crossrefs

Imaginary part = A076348, A076342, A076343, A076349.

A076343 A076340(A001358(n)), real part of semiprimes mapped as defined in A076340, A076341.

Original entry on oeis.org

4, 8, 15, 8, 16, 17, 31, 24, 15, 24, 47, 32, 33, 40, 49, 48, 63, 65, 49, 79, 56, 64, 47, 95, 72, 95, 80, 63, 88, 113, 97, 127, 96, 81, 104, 145, 97, 120, 129, 143, 120, 161, 175, 159, 136, 191, 144, 145, 111, 144, 129, 160, 209, 191, 168, 143, 239, 176, 241, 143
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A001358(15)=39=3*13=(4-1)*(12+1) -> (4,-1)*(12,1) = (4*12+1,4-12) = (49,-8), therefore a(15)=49 and A076344(120)=-8.
		

Crossrefs

Imaginary part = A076344, A076342, A076347.

A076344 A076341(A001358(n)), imaginary part of semiprimes mapped as defined in A076340, A076341.

Original entry on oeis.org

0, -2, -8, 2, -2, 0, -12, -2, 8, 2, -16, 2, 4, -2, -8, -2, -16, -12, 8, -24, 2, -2, 16, -28, 2, -20, 2, 20, -2, -24, -4, -36, -2, 16, 2, -32, 20, -2, -8, -24, 2, -36, -48, -28, -2, -52, -2, 0, 32, 2, 28, -2, -48, -32, -2, 24, -64, 2, -56, 40, -4, 2, -72, 2, -20, 44, -2, -32, -76, -2
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A001358(15)=39=3*13=(4-1)*(12+1) -> (4,-1)*(12,1) = (4*12+1,4-12) = (49,-8), therefore a(15)=-8 and A076343(15)=49.
		

Crossrefs

Real part = A076343, A070750, A076348.

A076349 A076340(A000290(n)), real part of squares mapped as defined in A076340, A076341.

Original entry on oeis.org

1, 4, 15, 16, 15, 60, 63, 64, 161, 60, 143, 240, 143, 252, 289, 256, 255, 644, 399, 240, 817, 572, 575, 960, 161, 572, 495, 1008, 783, 1156, 1023, 1024, 1953, 1020, 1073, 2576, 1295, 1596, 2337, 960, 1599, 3268, 1935, 2288, 4335, 2300, 2303, 3840, 3713
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Crossrefs

Imaginary part = A076350, A076347.

A076350 A076341(A000290(n)), imaginary part of squares mapped as defined in A076340, A076341.

Original entry on oeis.org

0, 0, -8, 0, 8, -32, -16, 0, -240, 32, -24, -128, 24, -64, 0, 0, 32, -960, -40, 128, -744, -96, -48, -512, 240, 96, -4888, -256, 56, 0, -64, 0, -1504, 128, 264, -3840, 72, -160, -784, 512, 80, -2976, -88, -384, -2312, -192, -96, -2048, -2016, 960, -1560, 384, 104
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Crossrefs

Real part = A076349, A076348.

A076345 A076340(A000961(n)), real part of prime powers mapped as defined in A076340, A076341.

Original entry on oeis.org

1, 2, 4, 4, 4, 8, 8, 15, 12, 12, 16, 16, 20, 24, 15, 52, 28, 32, 32, 36, 40, 44, 48, 63, 52, 60, 60, 64, 68, 72, 72, 80, 161, 84, 88, 96, 100, 104, 108, 108, 112, 143, 52, 128, 128, 132, 136, 140, 148, 152, 156, 164, 168, 143, 172, 180, 180, 192, 192, 196, 200, 212
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A000961(16)=27=3*3*3=(4-1)*(4-1)*(4-1) -> (4,-1)*(4,-1)*(4,-1) = (4*4-1,-8)*(4,-1) = (4*15-8,-32-15) = (52,-47), therefore a(16)=52 and A076346(16)=-47.
		

Crossrefs

Imaginary part = A076346, A076342.

A076346 A076341(A000961(n)), imaginary part of prime powers mapped as defined in A076340, A076341.

Original entry on oeis.org

0, 0, -1, 0, 1, -1, 0, -8, -1, 1, 0, 1, -1, -1, 8, -47, 1, -1, 0, 1, 1, -1, -1, -16, 1, -1, 1, 0, -1, -1, 1, -1, -240, -1, 1, 1, 1, -1, -1, 1, 1, -24, 47, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 24, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1121, -1, 0, 1, -1, 1, -1, 1, 1, -1, 32, 1, -1
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2002

Keywords

Examples

			Applying the map as defined in A076340, A076341:
A000961(16)=27=3*3*3=(4-1)*(4-1)*(4-1) -> (4,-1)*(4,-1)*(4,-1) = (4*4-1,-8)*(4,-1) = (4*15-8,-32-15) = (52,-47), therefore a(16)=-47 and A076345(16)=52.
		

Crossrefs

Real part = A076345, A070750.

A070750 0 if n-th prime is even, 1 if n-th prime is == 1 (mod 4), and -1 if n-th prime is == 3 (mod 4).

Original entry on oeis.org

0, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1
Offset: 1

Views

Author

Reinhard Zumkeller, May 04 2002

Keywords

Comments

Also, sin(prime(n)*Pi/2), where prime(n) = A000040(n), Pi=3.1415... (original definition).
Also imaginary part of primes mapped as defined in A076340, A076341: a(n) = A076341(A000040(n)), real part = A076342.
Legendre symbol (-1/prime(n)) for n > 1. - T. D. Noe, Nov 05 2003
For n > 1, let p = prime(n) and m = (p-1)/2. Then c(m) - a(n) == 0 (mod p), where c(m) = (2*m)!/(m!)^2 = A000984(m) is the central binomial coefficient. [Proof: By definition, c(m)*(m!)^2 - (p-1)! = 0 and therefore c(m)*(m!)^2*(-1)^(m+1) - (p-1)!*(-1)^(m+1) = 0. Now apply Wilson's theorem, (p-1)! == 1 (mod p), and its corollary, (m!)^2 == (-1)^(m+1) (mod p), and finally use the formula by T. D. Noe listed below to replace (-1)^m with a(n).] Similarly, C_m - 2*a(n) == 0 (mod p), with C_m = A000108(m) being the m-th Catalan number. [Proof: By definition, C_m*(p+1)*(m!)^2 - 2*(p-1)! = 0. The result follows proceeding as in the first proof.] - Stanislav Sykora, Aug 11 2014

Examples

			p = 4*k+1 (see A002144): a(p) = sin((4*k+1)*Pi/2) = sin(2*k*Pi + Pi/2) = sin(Pi/2) = 1.
p = 4*k+3 (see A002145): a(p) = sin((4*k+3)*Pi/2) = sin(2*k*Pi + 3*Pi/2) = sin(3*Pi/2) = -1.
		

Crossrefs

Programs

Formula

a(n) = 2 - prime(n) mod 4 = 2 - A039702(n).
a(n) = (-1)^((prime(n)-1)/2) for n > 1. - T. D. Noe, Nov 05 2003
From Amiram Eldar, Dec 24 2022: (Start)
Product_{n>=1} (1 - a(n)/prime(n)) = 4/Pi (A088538).
Product_{n>=1} (1 + a(n)/prime(n)) = 2/Pi (A060294). (End)

Extensions

Wording of definition changed by N. J. A. Sloane, Jun 21 2015
Showing 1-10 of 13 results. Next