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.

Previous Showing 11-20 of 372 results. Next

A282036 a(n) is the sum of quadratic nonresidues of A002145(n) (the n-th prime == 3 mod 4).

Original entry on oeis.org

2, 14, 33, 95, 161, 279, 473, 658, 944, 1139, 1491, 1738, 1826, 2884, 2996, 4318, 4585, 5004, 6191, 6683, 7849, 8413, 10314, 10746, 11394, 13157, 13393, 16013, 16566, 18936, 19783, 20376, 23946, 27057, 27804, 30883, 35541, 35232, 36384, 39832, 45671, 50858, 51363, 50059, 55097, 56040
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Sums of residues, nonresidues, and their differences, for p == 1 mod 4, p == 3 mod 4, and all p: A171555; A282035, A282036, A282037; A076409, A125615, A282038.
Cf. A002145.

Programs

  • Maple
    with(numtheory):
    a:=[]; m:=[]; d:=[];
    for i1 from 1 to 200 do
    p:=ithprime(i1);
    if (p mod 4) = 3 then
    sp:=0; sm:=0;
    for j from 1 to p-1 do
    if legendre(j,p)=1 then sp:=sp+j; else sm:=sm+j; fi; od;
    a:=[op(a),sp]; m:=[op(m),sm]; d:=[op(d),sm-sp];
    fi;
    od:
    a; m; d; # A282035, A282036, A282037
    # Alternative:
    f:= p -> add(-k^2 mod p, k=1..(p-1)/2)::
    map(f, select(isprime, [seq(p,p=3..1000,4)])); # Robert Israel, Nov 09 2020
  • Mathematica
    f[p_] := Total[Range[p-1] ~Complement~ Table[Mod[k^2, p], {k, (p-1)/2}] ]; f /@ Select[Range[3, 1000, 4], PrimeQ] (* Jean-François Alcover, Feb 16 2018, after Robert Israel *)
  • PARI
    lista(nn) = forprime(p=2, nn, if(p%4==3, print1(sum(k=1, p-1, if (!issquare(Mod(k, p)), k)), ", "))); \\ Michel Marcus, Nov 09 2020

Formula

a(n) = Sum_{k=1..(A002145(n)-1)/2} (-k^2) mod A002145(n). - J. M. Bergot and Robert Israel, Nov 09 2020

A082076 First differences of primes of the form 4*k+3 (A002145), divided by 4.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 1, 5, 1, 5, 1, 2, 3, 3, 1, 3, 3, 2, 3, 3, 1, 3, 3, 3, 2, 3, 6, 1, 5, 4, 3, 2, 3, 1, 9, 3, 2, 1, 5, 1, 3, 2, 1, 2, 1, 5, 6, 4, 2, 4, 3, 2, 3, 3, 3, 1, 3, 6, 2, 7, 2, 3, 1, 2, 9, 6, 3, 1, 3, 5, 1, 5, 1, 5, 1, 2, 7, 5, 1, 3, 2, 7, 3, 2, 3, 3, 6, 1, 3, 5, 7, 3, 2, 4, 9, 2, 7, 5, 1, 2
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Examples

			The first and second primes of the form 4*k+3 are 3 and 7, so a(1) = (7-3)/4 = 1.
		

Crossrefs

Programs

  • Mathematica
    k=0; m=4; r=3; Do[s=Mod[Prime[n], m]; If[Equal[s, r], rp=ep; k=k+1; ep=Prime[n]; Print[(ep-rp)/4]; ], {n, 1, 1000}]
    Differences[Select[Prime[Range[400]],IntegerQ[(#-3)/4]&]]/4 (* Harvey P. Dale, Apr 29 2022 *)

Formula

a(n) = (A002145(n+1) - A002145(n))/4.

A222298 Length of the Gaussian prime spiral beginning at the n-th positive real Gaussian prime (A002145).

Original entry on oeis.org

12, 12, 260, 12, 236, 28, 28, 28, 28, 236, 20, 44, 44, 20, 20, 36, 76, 12, 12, 4, 12, 4, 36, 36, 36, 3276, 76, 36, 36, 3276, 84, 20, 12, 12, 20, 36, 36, 2444, 2444, 36, 44, 1356, 156, 28, 12, 220, 12, 12, 84, 12, 132, 28, 68, 36, 36, 1044, 20, 20, 28, 1044, 20
Offset: 1

Views

Author

T. D. Noe, Feb 25 2013

Keywords

Comments

The Gaussian prime spiral is described in the short note by O'Rourke and Wagon. It is not known if every iteration is a closed loop. See A222299 for the number of distinct primes on the spiral. See A222300 for the length of the spiral (which is the same as the number of numbers tested for primality, without memory).
This idea can be extended to any Gaussian prime. Sequences A222594, A222595, and A222596 show the results for first-quadrant Gaussian primes. - T. D. Noe, Feb 27 2013

Examples

			The loop beginning with 31 is {31, 43, 43 - 8i, 37 - 8i, 37 - 2i, 45 - 2i, 45 - 8i, 43 - 8i, 43, 47, 47 - 2i, 45 - 2i, 45 + 2i, 47 + 2i, 47, 43, 43 + 8i, 45 + 8i, 45 + 2i, 37 + 2i, 37 + 8i, 43 + 8i, 43, 31, 31 + 4i, 41 + 4i, 41 - 4i, 31 - 4i, 31}. The first and last numbers are the same. So only one is counted.
		

References

  • Joseph O'Rourke and Stan Wagon, Gaussian prime spirals, Mathematics Magazine, vol. 86, no. 1 (2013), p. 14.

Programs

  • Mathematica
    loop[n_] := Module[{p = n, direction = 1}, lst = {n}; While[While[p = p + direction; ! PrimeQ[p, GaussianIntegers -> True]]; direction = direction*(-I); AppendTo[lst, p]; ! (p == n && direction == 1)]; Length[lst]]; cp = Select[Range[1000], PrimeQ[#, GaussianIntegers -> True] &]; Table[loop[p]-1, {p, cp}]

A334447 Decimal expansion of Product_{k>=1} (1 + 1/A002145(k)^4).

Original entry on oeis.org

1, 0, 1, 2, 8, 4, 9, 7, 3, 7, 5, 0, 3, 6, 5, 8, 2, 4, 1, 0, 5, 3, 7, 3, 8, 8, 0, 9, 6, 3, 0, 1, 1, 2, 0, 3, 9, 6, 8, 4, 5, 0, 4, 2, 1, 6, 5, 5, 3, 8, 6, 9, 4, 5, 0, 9, 2, 2, 2, 1, 4, 4, 1, 8, 1, 9, 1, 3, 4, 1, 5, 6, 6, 9, 0, 0, 5, 5, 2, 5, 7, 1, 6, 6, 4, 2, 4, 8, 6, 1, 2, 7, 5, 4, 1, 3, 0, 2, 9, 9, 9, 3, 4, 4, 9
Offset: 1

Views

Author

Vaclav Kotesovec, Apr 30 2020

Keywords

Comments

In general, for s>1, Product_{k>=1} (1 + 1/A002145(k)^s)/(1 - 1/A002145(k)^s) = 2^s * (2^s - 1) * zeta(s) / (zeta(s, 1/4) - zeta(s, 3/4)) = 1 / (2 * (-1)^s * PolyGamma(s-1, 1/4) / (2^s * (2^s - 1) * Gamma(s) * zeta(s)) - 1).

Examples

			1.01284973750365824105373880963011203968450421655386945092221...
		

References

  • B. C. Berndt, Ramanujan's notebook part IV, Springer-Verlag, 1994, p. 64-65.

Crossrefs

Formula

A334447 / A334448 = 1/(PolyGamma(3, 1/4)/(8*Pi^4) - 1).
A334445 * A334447 = 1680 / (17*Pi^4).

Extensions

More digits from Vaclav Kotesovec, Jun 27 2020

A334451 Decimal expansion of Product_{k>=1} (1 + 1/A002145(k)^5).

Original entry on oeis.org

1, 0, 0, 4, 1, 8, 1, 8, 1, 6, 7, 7, 0, 8, 5, 6, 6, 9, 0, 3, 8, 8, 7, 2, 6, 9, 7, 6, 5, 6, 5, 8, 5, 6, 9, 6, 0, 6, 3, 1, 5, 8, 1, 9, 5, 0, 6, 3, 6, 7, 4, 3, 2, 8, 8, 2, 8, 3, 4, 2, 4, 9, 7, 6, 8, 6, 9, 7, 7, 9, 4, 4, 9, 6, 4, 3, 9, 9, 3, 8, 0, 8, 1, 9, 9, 2, 1, 4, 5, 9, 3, 8, 0, 5, 7, 9, 0, 0, 6, 2, 3, 4, 5, 2, 5
Offset: 1

Views

Author

Vaclav Kotesovec, Apr 30 2020

Keywords

Comments

In general, for s>0, Product_{k>=1} (1 + 1/A002145(k)^(2*s+1))/(1 - 1/A002145(k)^(2*s+1)) = (2*s)! * (2^(2*s + 2) - 2) * zeta(2*s+1) / (Pi^(2*s+1) * A000364(s)). - Dimitris Valianatos, May 01 2020
In general, for s>1, Product_{k>=1} (1 + 1/A002145(k)^s)/(1 - 1/A002145(k)^s) = 2^s * (2^s - 1) * zeta(s) / (zeta(s, 1/4) - zeta(s, 3/4)).

Examples

			1.0041818167708566903887269765658569606315819506367432882834249768697794496439...
		

References

  • B. C. Berndt, Ramanujan's notebook part IV, Springer-Verlag, 1994, p. 64-65.

Crossrefs

Formula

A334451 / A334452 = 1488*zeta(5)/(5*Pi^5).
A334449 * A334451 = 90720*zeta(5)/Pi^10.

Extensions

More digits from Vaclav Kotesovec, Jun 27 2020

A334452 Decimal expansion of Product_{k>=1} (1 - 1/A002145(k)^5).

Original entry on oeis.org

9, 9, 5, 8, 1, 8, 7, 2, 9, 8, 6, 8, 0, 8, 0, 5, 9, 5, 9, 4, 3, 3, 8, 5, 1, 6, 1, 6, 4, 3, 1, 6, 5, 9, 7, 1, 8, 7, 4, 3, 4, 7, 2, 7, 3, 1, 8, 4, 9, 1, 0, 5, 6, 6, 3, 9, 8, 3, 5, 7, 7, 1, 4, 6, 9, 8, 0, 3, 9, 6, 3, 9, 6, 7, 0, 3, 1, 0, 4, 6, 7, 9, 7, 0, 0, 5, 4, 4, 0, 1, 9, 6, 8, 0, 3, 1, 8, 2, 3, 3, 9, 3, 9, 8, 4, 5
Offset: 0

Views

Author

Vaclav Kotesovec, Apr 30 2020

Keywords

Comments

In general, for s>0, Product_{k>=1} (1 + 1/A002145(k)^(2*s+1))/(1 - 1/A002145(k)^(2*s+1)) = (2*s)! * (2^(2*s + 2) - 2) * zeta(2*s+1) / (Pi^(2*s+1) * A000364(s)). - Dimitris Valianatos, May 01 2020
In general, for s>1, Product_{k>=1} (1 + 1/A002145(k)^s)/(1 - 1/A002145(k)^s) = 2^s * (2^s - 1) * zeta(s) / (zeta(s, 1/4) - zeta(s, 3/4)).

Examples

			0.99581872986808059594338516164316597187434727318491056639835771469803963967031...
		

References

  • B. C. Berndt, Ramanujan's notebook part IV, Springer-Verlag, 1994, p. 64-65.

Crossrefs

Formula

A334451 / A334452 = 1488*zeta(5)/(5*Pi^5).
A334450 * A334452 = 32/(31*zeta(5)).

Extensions

More digits from Vaclav Kotesovec, Jun 27 2020

A348747 Fully multiplicative with a(2) = 1, a(3) = 2, a(5) = 3, a(A002144(1+n)) = A002144(n) and a(A002145(1+n)) = a(A002145(1+n)) for all n >= 1, where A002144 and A002145 give the primes of the form 4k+1 and 4k+3 respectively.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 7, 1, 4, 3, 11, 2, 5, 7, 6, 1, 13, 4, 19, 3, 14, 11, 23, 2, 9, 5, 8, 7, 17, 6, 31, 1, 22, 13, 21, 4, 29, 19, 10, 3, 37, 14, 43, 11, 12, 23, 47, 2, 49, 9, 26, 5, 41, 8, 33, 7, 38, 17, 59, 6, 53, 31, 28, 1, 15, 22, 67, 13, 46, 21, 71, 4, 61, 29, 18, 19, 77, 10, 79, 3, 16, 37, 83, 14, 39, 43, 34, 11, 73
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Crossrefs

Left inverse of A348746.
Cf. also A064989, A332819 for similar maps.

Programs

  • PARI
    A348747(n) = { my(f=factor(n)); for(k=1,#f~, if(f[k,1]<=3, f[k,1]--, if(5==f[k,1], f[k,1]=3, if(1==(f[k,1]%4), forstep(i=primepi(f[k,1])-1,0,-1,if(1==(prime(i)%4), f[k,1]=prime(i); break)))))); factorback(f); };

Formula

Fully multiplicative with a(p) = A348745(A000720(p)).
a(A348746(n)) = n.
a(2n) = a(A000265(n)) = a(n).

A352400 a(n) is the left Aurifeuillian factor of p^p + 1 for A002145(n), where A002145 lists the primes congruent to 3 (mod 4).

Original entry on oeis.org

1, 113, 58367, 113631466919, 348275601426959, 8403855868042458448127, 7248206084007410402911299180581471, 105318477338066161993242388018074119617, 830220061043693789623432394289631761145130727636121
Offset: 1

Views

Author

Patrick A. Thomas, Jun 08 2022

Keywords

Comments

For prime factorizations of p^p + 1 see A125136.

Examples

			105318477338066161993242388018074119617 is the smaller Aurifeuillian factor of 47^47 + 1, and 47 is the 8th term of A002145, so it is a(8).
		

Crossrefs

Formula

If R is (p^p+1)/(p+1), where p == 3 (mod 4) and p > 7, then an approximation of the left Aurifeuillian factor of R is (1/e) * sqrt(R/(1+z)), where z =
2/(3p) + 28/(45p^2) + 1706/(2835p^3) if p=1,79,109,121,151 or 169 (mod 210),
2/(3p) + 28/(45p^2) + 86/(2835p^3) if p=19,31,61,139,181 or 199 (mod 210),
2/(3p) - 8/(45p^2) + 194/(2835p^3) if p=37,43,67,127,163 or 193 (mod 210),
2/(3p) - 8/(45p^2) - 1426/(2835p^3) if p=13,73,97,103,157 or 187 (mod 210),
-2/(3p) - 8/(45p^2) + 1426/(2835p^3) if p=23,53,107,113,137 or 197 (mod 210),
-2/(3p) - 8/(45p^2) - 194/(2835p^3) if p=17,47,83,143,167 or 173 (mod 210),
-2/(3p) + 28/(45p^2) - 86/(2835p^3) if p=11,29,71,149,179 or 191 (mod 210),
-2/(3p) + 28/(45p^2) - 1706/(2835p^3) if p=41,59,89,101,131 or 209 (mod 210).

A385166 Let p = A002145(n) be the n-th prime == 3 (mod 4); a(n) = (p+1) * ord(5,p) / ord(2+-i,p) = (p+1) * ord(5,p) / A385165(n). Here ord(a,m) is the multiplicative order of a modulo m.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 5, 1, 1, 1, 1, 3, 2, 2, 1, 1, 2, 2, 1, 1, 1, 11, 1, 4, 3, 10, 1, 1, 1, 3, 1, 2, 1, 1, 1, 6, 1, 6, 1, 3, 1, 1, 1, 4, 3, 24, 1, 1, 1, 1, 1, 3, 1, 4, 2, 1, 1, 1, 1, 1, 2, 1, 1, 8, 1, 27, 1, 1, 1, 1, 20, 3, 1, 4, 1, 1
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).

Examples

			The multiplicative order of 2+-i modulo A002145(3) = 11 is A385165(3) = 30, so a(3) = (12*ord(5,11))/30 = 2.
The multiplicative order of 2+-i modulo A002145(13) = 83 is A385165(13) = 2296, so a(13) = (84*ord(5,83))/2296 = 3.
		

Crossrefs

Cf. A002145, A385165. Primes corresponding to special terms: A385168 (>1), A385167 (even), A385180 (divisible by 4).
Cf. A211450.

Programs

  • PARI
    quot(p) = my(z = znorder(Mod(5,p)), d = divisors((p+1)*z)); for(i=1, #d, if(Mod([2,-1;1,2],p)^d[i] == 1, return((p+1)*z/d[i]))) \\ for a prime p == 3 (mod 4), returns (p+1) * ord(5,p) / ord(2+-i, p)
    forprime(p=3, 1e3, if(p%4==3, print1(quot(p), ", ")))

A095104 Diving index of the n-th 4k+3 prime (A002145(n)).

Original entry on oeis.org

0, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 7, 7, 0, 3, 0, 3, 0, 11, 0, 0, 3, 13, 61, 0, 0, 0, 0, 3, 3, 0, 3, 7, 0, 45, 3, 0, 0, 0, 0, 7, 7, 35, 0, 7, 35, 3, 0, 3, 3, 0, 3, 15, 0, 0, 3, 15, 3, 0, 0, 7, 3, 0, 45, 3, 0, 0, 3, 3, 7, 7, 0, 3, 0, 3, 0, 3, 0, 0, 7, 7, 0, 0, 0, 67, 0, 0, 3, 0
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

Diving index of an odd number n is the first integer u > 1 where Sum_{i=1..u} J(i/n) results -1 and zero if never. Here J(i/n) is Jacobi symbol of i and n, which reduces to a Legendre symbol L(i/n) when n is a prime.

Crossrefs

a(n)=A095105(n)+1 modulo A002145(n). Cf. A095106, A095108 (same sequence with zeros removed), A095269.
Previous Showing 11-20 of 372 results. Next