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 510 results. Next

A059321 Smallest number m such that m^2+1 is divisible by A002144(n)^2 (= squares of primes congruent to 1 mod 4).

Original entry on oeis.org

7, 70, 38, 41, 117, 378, 500, 682, 776, 3861, 4052, 515, 5744, 1710, 6613, 1744, 11018, 13241, 3458, 5099, 1393, 16610, 26884, 15006, 2072, 13637, 31361, 4443, 26508, 7850, 37520, 31152, 39922, 37107, 6072, 4005, 32491, 4030, 43211, 12238
Offset: 1

Views

Author

Marc LeBrun, Jan 26 2001

Keywords

Comments

a(2) = 70 since A002144(2)=13, 70^2+1 = 4091 = 13^2 * 29 and for no k<70 does 13^2 divide k^2+1. Related to period-1 continued fractions.

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy import nextprime, sqrt_mod_iter
    def A059321_gen(): # generator of terms
        p = 1
        while (p:=nextprime(p)):
            if p&3==1:
                yield min(sqrt_mod_iter(-1,p**2))
    A059321_list = list(islice(A059321_gen(),20)) # Chai Wah Wu, May 04 2024

A348746 Fully multiplicative with a(2) = 3, a(3) = 5, a(A002144(n)) = A002144(1+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, 3, 5, 9, 13, 15, 7, 27, 25, 39, 11, 45, 17, 21, 65, 81, 29, 75, 19, 117, 35, 33, 23, 135, 169, 51, 125, 63, 37, 195, 31, 243, 55, 87, 91, 225, 41, 57, 85, 351, 53, 105, 43, 99, 325, 69, 47, 405, 49, 507, 145, 153, 61, 375, 143, 189, 95, 111, 59, 585, 73, 93, 175, 729, 221, 165, 67, 261, 115, 273, 71, 675, 89, 123
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Comments

Permutation of odd numbers. Preserves the prime signature.

Crossrefs

Cf. A000720, A002144, A002145, A348744, A348747 (left inverse).
Cf. also A003961, A332818 for similar maps.

Programs

  • PARI
    A348746(n) = { my(f=factor(n)); for(k=1,#f~, if(2==f[k,1], f[k,1]=3, if(3==f[k,1], f[k,1]=5, if(1==(f[k,1]%4), for(i=1+primepi(f[k,1]),oo,if(1==(prime(i)%4), f[k,1]=prime(i); break)))))); factorback(f); };

Formula

Fully multiplicative with a(p) = A348744(A000720(p)), where A348744 is the lexicographically earliest bijection from primes to odd primes where each prime of the form 4k+1 is mapped to the next larger prime of the same form.

A080175 Fourth power of primes of the form 4k+1 (A002144).

Original entry on oeis.org

625, 28561, 83521, 707281, 1874161, 2825761, 7890481, 13845841, 28398241, 62742241, 88529281, 104060401, 141158161, 163047361, 352275361, 492884401, 607573201, 895745041, 1073283121, 1387488001, 1506138481, 2750058481
Offset: 1

Views

Author

Cino Hilliard, Mar 16 2003

Keywords

Comments

a(n) is the hypotenuse of four and only four right triangles with integral legs (Fermat). See the Dickson reference, (A) on p. 227.
In 1640 Fermat generalized the 3,4,5 Pythagorean triangle with the theorem: A prime of the form 4k+1 is the hypotenuse of one and only one right triangle with integral legs. The square of a prime of the form 4k+1 is the hypotenuse of two and only two... The cube of three and only three...

Examples

			625 is the hypotenuse of triangles 175, 600, 625; 220, 585, 625; 336, 527, 625; 375, 500, 625.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Volume II, Diophantine Analysis. Carnegie Institution Publication No. 256, Vol II, Washington, DC, 1920, p. 227.
  • Morris Kline, Mathematical Thought from Ancient to Modern Times, 1972, pp. 275-276.

Crossrefs

Programs

  • Magma
    [a^4: n in [0..40] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Jun 24 2015
  • Maple
    seq(p^4, p = select(isprime,[seq(4*k+1,k=1..100)])); # Robert Israel, Jan 14 2015
  • Mathematica
    Select[4 Range[100] + 1, PrimeQ[#] &]^4 (* Vincenzo Librandi, Jun 24 2015 *)
  • PARI
    fermat(n) = { for(x=1,n, y=4*x+1; if(isprime(y),print1(y^4, " ")) ) }
    

Formula

a(n) = A002144(n)^4 = A080109(n)^2, n >= 1.
Product_{n>=1} (1 - 1/a(n)) = A334446. - Amiram Eldar, Dec 02 2022

Extensions

Edited: name shortened, part of old name as a comment, comment changed, Dickson reference, formula and cross references added. - Wolfdieter Lang, Jan 14 2015

A094178 Numbers n such that 4n+1 is divisible only by primes of form 4m+1 (i.e., by the Pythagorean primes A002144).

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 10, 13, 15, 16, 18, 21, 22, 24, 25, 27, 28, 31, 34, 36, 37, 39, 42, 43, 45, 46, 48, 49, 51, 55, 57, 58, 60, 64, 66, 67, 69, 70, 72, 73, 76, 78, 79, 81, 84, 87, 88, 91, 93, 94, 97, 99, 100, 102, 105, 106, 108, 111, 112, 114, 115, 120, 121, 123, 126, 127
Offset: 1

Views

Author

Lekraj Beedassy, May 06 2004

Keywords

Comments

For the actual numbers 4n+1, see A008846(n).
Complement of A124934; A125203(a(n)) = 0; A000290 and A000217 are subsequences. - Reinhard Zumkeller, Nov 24 2006

Programs

  • Haskell
    import Data.List (elemIndices)
    a094178 n = a094178_list !! (n-1)
    a094178_list = map (+ 1) $ elemIndices 0 a125203_list
    -- Reinhard Zumkeller, Jan 02 2013

Extensions

More terms from Ray Chandler, Jun 20 2004

A145299 Smallest k such that k^2+1 is divisible by A002144(n)^6.

Original entry on oeis.org

1068, 1999509, 390112, 253879357, 756360062, 2363588163, 5041394261, 9435321777, 41865466758, 102666405913, 197177418061, 316411915250, 171829799914, 625667121807, 182312430890, 1095001339019, 6390289199260
Offset: 1

Views

Author

Klaus Brockhaus, Oct 17 2008

Keywords

Examples

			a(1) = 1068 since A002144(1) = 5, 1068^2+1 = 1140625 = 5^6*73 and for no k < 1068 does 5^6 divide k^2+1. a(11) = 197177418061 since A002144(11) = 97, 197177418061^2+1 = 38878934193202368999722 = 2*97^6*23337479509 and for no k < 197177418061 does 97^6 divide k^2+1.
		

Crossrefs

Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145297, A145298.

Programs

  • PARI
    { e=6; forprime(p=2, 1000, if(p%4==1, k=lift(sqrt(-1+O(p^e))); if(k>p^e/2,k=p^e-k); print1(k, ", "))) }
    
  • Python
    from itertools import islice
    from sympy import nextprime, sqrt_mod_iter
    def A145299_gen(): # generator of terms
        p = 1
        while (p:=nextprime(p)):
            if p&3==1:
                yield min(sqrt_mod_iter(-1,p**6))
    A145299_list = list(islice(A145299_gen(),20)) # Chai Wah Wu, May 04 2024

Extensions

More terms and efficient PARI program from. - Max Alekseyev, Oct 28 2008

A267101 2 followed by permutation of odd primes, where each n-th prime of the form 4k+1 (A002144) has been replaced with the n-th prime of the form 4k+3 (A002145) and vice versa.

Original entry on oeis.org

2, 5, 3, 13, 17, 7, 11, 29, 37, 19, 41, 23, 31, 53, 61, 43, 73, 47, 89, 97, 59, 101, 109, 67, 71, 79, 113, 137, 83, 103, 149, 157, 107, 173, 127, 181, 131, 193, 197, 139, 229, 151, 233, 163, 167, 241, 257, 269, 277, 179, 191, 281, 199, 293, 211, 313, 223, 317, 227, 239, 337, 251, 349, 353, 263, 271, 373, 283, 389
Offset: 1

Views

Author

Antti Karttunen, Feb 01 2016

Keywords

Comments

After 2, for each n >= 1, swap the places of primes A002144(n) and A002145(n) in A000040.

Examples

			For n=2, for which A000040(2) = 3, the first prime of the form 4k+3, we select the first prime of the form 4k+1, which is 5, thus a(2) = 5.
For n=3, for which A000040(3) = 5, the first prime of the form 4k+1, we select the first prime of the form 4k+3, which is 3, thus a(3) = 3.
For n=4, for which A000040(4) = 7, the second prime of the form 4k+3, we select the second prime of the form 4k+1, which is 13, thus a(4) = 13.
For n=5, for which A000040(5) = 11, the third prime of the form 4k+3, we select the third prime of the form 4k+1, which is 17, thus a(5) = 17.
		

Crossrefs

Programs

Formula

a(1) = 2; after which, if prime(n) modulo 4 = 1, a(n) = A002145(A267097(n)), otherwise a(n) = A002144(A267098(n)).
a(n) = A000040(A267100(n)).
a(n) = A267099(A000040(n)).

A334446 Decimal expansion of Product_{k>=1} (1 - 1/A002144(k)^4).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Apr 30 2020

Keywords

Comments

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

Examples

			0.998350495723200406499905517565541629191539407019605795046314...
		

References

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

Crossrefs

Formula

A334445 / A334446 = 35*(PolyGamma(3, 1/4)/(8*Pi^4) - 1)/34.
A334446 * A334448 = 96/Pi^4.

Extensions

More digits from Vaclav Kotesovec, Jun 27 2020

A121387 Semiprimes p*q with p and q primes of the form 4k+1 (A002144).

Original entry on oeis.org

25, 65, 85, 145, 169, 185, 205, 221, 265, 289, 305, 365, 377, 445, 481, 485, 493, 505, 533, 545, 565, 629, 685, 689, 697, 745, 785, 793, 841, 865, 901, 905, 949, 965, 985, 1037, 1073, 1145, 1157, 1165, 1189, 1205, 1241, 1261, 1285, 1313, 1345, 1369, 1385, 1405, 1417
Offset: 1

Views

Author

Alford Arnold, Jul 26 2006, corrected Jun 24 2007

Keywords

Comments

p and q can be the same. [Harvey P. Dale, Jan 15 2012]
The terms are semiprimes of the form 4k + 1, and comprise only a portion of all such semiprimes, see A108181. - Richard R. Forberg, Aug 27 2013

Examples

			65 = 5 * 13. Note that 5 mod 4 = 1 and 13 mod 4 = 1, so 65 is a term.
		

Crossrefs

Fifth row of A121388.
Union of A080109 and A131574.

Programs

  • Mathematica
    With[{prs=Select[Prime[Range[150]],Mod[#,4]==1&]},Take[Union[Times @@@ Tuples[prs,2]],60]] (* Harvey P. Dale, Jan 15 2012 *)

Extensions

Better definition from T. D. Noe, Sep 25 2007

A145296 Smallest k such that k^2 + 1 is divisible by A002144(n)^3.

Original entry on oeis.org

57, 239, 1985, 10133, 9466, 11389, 27590, 51412, 153765, 344464, 107551, 296344, 172078, 432436, 931837, 753090, 676541, 2321221, 2027724, 3394758, 1706203, 4841182, 1438398, 2947125, 398366, 5657795, 4942017, 9400802, 11906503
Offset: 1

Views

Author

Klaus Brockhaus, Oct 08 2008

Keywords

Examples

			a(3) = 1985 since A002144(3) = 17, 1985^2 + 1 = 3940226 = 2*17^3*401 and for no k < 1985 does 17^3 divide k^2+1.
		

Crossrefs

Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145297, A145298, A145299.

Programs

  • PARI
    {m=12000000; pmax=300; z=70; v=vector(z); for(n=1, m, fac=factor(n^2+1); for(j=1, #fac[, 1], if(fac[j, 2]>=3&&fac[j, 1]<=pmax, q=primepi(fac[j, 1]); if(q<=z&&v[q]==0, v[q]=n)))); t=1; j=0; while(t&&j
    				
  • PARI
    {e=3; forprime(p=2, 300, if(p%4==1, q=p^e; m=q; while(!ispower(m-1,2,&n), m=m+q); print1(n, ",")))} \\ Klaus Brockhaus, Oct 09 2008
    
  • Python
    from itertools import islice
    from sympy import nextprime, sqrt_mod_iter
    def A145296_gen(): # generator of terms
        p = 1
        while (p:=nextprime(p)):
            if p&3==1:
                yield min(sqrt_mod_iter(-1,p**3))
    A145296_list = list(islice(A145296_gen(),20)) # Chai Wah Wu, May 04 2024

A145297 Smallest k such that k^2+1 is divisible by A002144(n)^4.

Original entry on oeis.org

182, 239, 27493, 34522, 800982, 1251967, 623098, 6304056, 6459524, 20099637, 22709274, 35764191, 40317977, 54397650, 166206108, 187800003, 165728858, 152475014, 282599844, 312923750, 154613663, 485200742, 912190662, 548850444
Offset: 1

Views

Author

Klaus Brockhaus, Oct 11 2008

Keywords

Examples

			a(1) = 182 since A002144(1) = 5, 182^2+1 = 33125 = 5^4*53 and for no k < 182 does 5^4 divide k^2+1.
		

Crossrefs

Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145298, A145299.

Programs

  • PARI
    {e=4; forprime(p=2, 250, if(p%4==1, q=p^e; m=q; while(!ispower(m-1,2,&n), m=m+q); print1(n, ",")))}
    
  • Python
    from itertools import islice
    from sympy import nextprime, sqrt_mod_iter
    def A145297_gen(): # generator of terms
        p = 1
        while (p:=nextprime(p)):
            if p&3==1:
                yield min(sqrt_mod_iter(-1,p**4))
    A145297_list = list(islice(A145297_gen(),20)) # Chai Wah Wu, May 04 2024
Previous Showing 11-20 of 510 results. Next