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.

User: Nicholas C. Singer

Nicholas C. Singer's wiki page.

Nicholas C. Singer has authored 2 sequences.

A330406 a(n) is the smallest prime q such that q^((p-1)/2) == -1 (mod p), where p = A002144(n) is the n-th prime congruent to 1 mod 4.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 5, 3, 5, 2, 2, 3, 3, 2, 2, 2, 2, 5, 2, 2, 3, 7, 3, 2, 2, 3, 2, 5, 2, 5, 2, 3, 2, 2, 2, 3, 7, 2, 5, 3, 5, 2, 2, 3, 2, 2, 3, 5, 3, 7, 2, 3, 3, 2, 2, 5, 2, 2, 2, 2, 2, 3, 7, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 5, 2, 3, 3, 2, 11, 2, 2, 5, 3, 2, 2, 2, 3, 2, 2, 11, 5, 2, 3, 11, 2, 3, 2, 2, 7, 2, 3, 5, 2, 7, 3, 2, 2
Offset: 1

Author

Nicholas C. Singer, Dec 13 2019

Keywords

Comments

Subset of A053760 corresponding to p == 1 (mod 4).
A002144(n) = p is a sum of two integer squares (Fermat): p = a^2 + b^2. To find a and b, calculate gcd(p, A330406(n)^((p-1)/4)+i) = a + bi in the Gaussian integers.

Examples

			Let p = A002144(30)= 313. Then (p-1)/2 = 156. Now 2^156 == 3^156 == 1 (mod p) but 5^156 == -1 (mod p).  Thus A330406(30)=5.
		

Crossrefs

Programs

  • Mathematica
    Map[Block[{q = 2}, While[PowerMod[q, (# - 1)/2, #] != # - 1, q = NextPrime@ q]; q] &, Select[4 Range[350] + 1, PrimeQ]] (* Michael De Vlieger, Dec 29 2019 *)
  • PARI
    A002144 = select(p->p%4==1, primes(2200));
    A330406 = vector(1000); for(i=1, 1000, my(p=A002144[i]); forprime(j=1, 20, my(x=Mod(j, p)^((p-1)/2)); if(x+1, , A330406[i]=j; break)))
    A330406

A087751 Weighted sum of the harmonic numbers.

Original entry on oeis.org

0, 1, 7, 56, 538, 6124, 81048, 1226112, 20902992, 396857376, 8308373760, 190212376320, 4728556327680, 126865966625280, 3654264347274240, 112484501485977600, 3685202487258163200, 128039255560187596800
Offset: 0

Author

Nicholas C. Singer (nsinger2(AT)cox.net), Oct 02 2003

Keywords

Crossrefs

Programs

  • PARI
    H(n)=sum(j=1,n,1/j); a(n)=n!*sum(j=1,n,binomial(n,j)*H(j))

Formula

a(n) = 2*n*a(n-1) + (n-1)!*(2^n-1); a(0)=0, a(1)=1. a(n)=n! * sum(j=1, n, binomial(n, j)*H(j)), where H(j)=sum(k=1, j, 1/k).
E.g.f.: log((2*x-1)/(x-1))/(2*x-1). a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*2^(n-k)*binomial(n, k)/k. a(n) = n!*Sum_{k=1..n} 2^(n-k)*(2^k-1)/k. - Vladeta Jovovic, Aug 12 2005
a(n) ~ n! * log(n) * 2^n * (1 + (gamma-log(2))/log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jun 03 2022