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: Anthony Hernandez

Anthony Hernandez's wiki page.

Anthony Hernandez has authored 7 sequences.

A323552 Denominators of the partial Euler product representation of Pi/4.

Original entry on oeis.org

4, 16, 128, 512, 6144, 98304, 393216, 9437184, 37748736, 1207959552, 43486543872, 1739461754880, 6957847019520, 333976656936960, 1335906627747840, 80154397664870400, 4809263859892224000, 19237055439568896000, 1385067991648960512000, 99724895398725156864000
Offset: 1

Author

Anthony Hernandez, Jan 17 2019

Keywords

Comments

The Euler product representation follows from the classical Leibniz series representation of Pi/4 interpreted as a Dirichlet L-series using the unique non-principal Dirichlet characters modulo 4, whose (infinite) Euler product representation can be written as (3/4) * (5/4) * (7/8) * (11/12) * (13/12) * (17/16) * (19/20) * ... with each term in the product being the ratio of a prime number to its nearest multiple of 4. The sequence consists of the denominators of the partial products.

Examples

			a(3) = 128 = denominator((3/4) * (5/4) * (7/8)).
		

Crossrefs

Cf. A003881 (Decimal Expansion of Pi/4).
Cf. A101455 (Dirichlet L-series of The Non-Principal Dirichlet Characters Mod 4).
Cf. A323551 (Numerators of the Partial Euler Product Representation of Pi/4).

Programs

  • PARI
    a(n) = denominator(prod(k=2, n+1, my(p=prime(k)); if(p%4==1, p/(p-1), p/(p+1)))); \\ Daniel Suteu, Jan 22 2019

Extensions

More terms from Daniel Suteu, Jan 22 2019

A323551 Numerators of the partial Euler product representation of Pi/4.

Original entry on oeis.org

3, 15, 105, 385, 5005, 85085, 323323, 7436429, 30808063, 955049953, 35336848261, 1448810778701, 5663533044013, 266186053068611, 1085220062510491, 64027983688118969, 3905707004975257109, 15393080549020130959, 1092908718980429298089, 79782336485571338760497
Offset: 1

Author

Anthony Hernandez, Jan 16 2019

Keywords

Comments

The Euler product representation follows from the classical Leibniz series representation of Pi/4 interpreted as a Dirichlet L-series using the unique non-principal Dirichlet characters modulo 4, whose (infinite) Euler product representation can be written as (3/4) * (5/4) * (7/8) * (11/12) * (13/12) * ..., with each term in the product being the ratio of a prime number to its nearest multiple of 4. The sequence consists of the numerators of the partial products.

Examples

			a(3) = 105 = numerator((3/4) * (5/4) * (7/8)).
		

Crossrefs

Cf. A003881 (Decimal expansion of Pi/4).
Cf. A101455 (Dirichlet L-series of The Non-Principal Dirichlet Characters Mod 4).
Cf. A323552 (Denominators of the Partial Euler Product Representation of Pi/4).
Cf. A236436 (Denominators of the Product (1 + 1/p), where p is prime).
Cf. A002144 (Primes of the form 4n+1; Pythagorean primes).
Cf. A002145 (Primes of the form 4n+3).

Programs

  • PARI
    a(n) = numerator(prod(k=2, n+1, my(p=prime(k)); if(p%4==1, p/(p-1), p/(p+1)))); \\ Daniel Suteu, Jan 22 2019

Extensions

More terms from Daniel Suteu, Jan 22 2019

A293462 Let A_n be a square n X n matrix with entries A_n(i,j)=1 if i+j is a perfect power, and A_n(i,j)=0 otherwise. Then a(n) counts the 1's in A_n.

Original entry on oeis.org

0, 1, 3, 4, 8, 12, 16, 19, 21, 23, 25, 27, 31, 37, 43, 48, 54, 61, 69, 77, 85, 93, 101, 109, 117, 125, 131, 137, 143, 149, 155, 160, 166, 172, 178, 182, 186, 190, 194, 198, 204, 210, 216, 222, 228, 234, 240, 246, 250, 255, 261, 267, 273, 279, 285, 291, 297, 303, 309, 315, 323, 331, 341, 350, 360
Offset: 1

Author

Anthony Hernandez, Oct 09 2017

Keywords

Comments

A_n is a binary symmetric Hankel matrix.
Lim_{n->infinity} a(n)/n^2 = 0.
Proof: It can be seen from the formula that a(n) is bound from above by n*[number of perfect powers <= 2*n]. Powers of any particular number contribute no more than log_2(n) each, and there are no more than sqrt(2n) numbers that contribute anything at all, so a(n) <= n*log_2(n)*sqrt(2n), and a(n)/n^2 <= sqrt(2)*log_2(n)/sqrt(n), which goes to 0 at infinity. - Andrey Zabolotskiy, Oct 16 2017
Conjecture: The golden ratio/golden conjugate are eigenvalues of A_n if and only if n=6, 8 or 9. This has been verified up to n=500.
Conjecture: the sequence increases monotonically. - Robert G. Wilson v, Oct 09 2017
Where the parity of a(n) switches: 2, 4, 8, 16, 18, 32, 50, 64, 72, 98, 108, 128, 162, 200, 242, 256, 288, 338, 392, 450, 500, 512, 578, 648, 722, 800, 864, 882, 968, etc. Each number that is twice a square is present. - Robert G. Wilson v, Oct 09 2017

Examples

			         |0 0 1 0 0|
         |0 1 0 0 0|
   A_5 = |1 0 0 0 1| and so a(5) = 8.
         |0 0 0 1 1|
         |0 0 1 1 0|
		

Crossrefs

Cf. A075802, A292918 (analogous sequence built upon A010051 instead of A075802).

Programs

  • Mathematica
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; f[n_] := Plus @@ Flatten@ Table[ Boole[ perfectPowerQ[i + j]], {i, n}, {j, n}]; Array[f, 60] (* Robert G. Wilson v, Oct 09 2017 *)
    f[n_] := f[n] = f[n - 1] + 2 Plus @@ Flatten@ Table[ Boole[ perfectPowerQ[i + n]], {i, n - 1}] + If[ perfectPowerQ[2 n], 1, 0]; f[1] = 0; Array[f, 60] (* Robert G. Wilson v, Nov 23 2017 *)
  • PARI
    a(n) = sum(i=1, n, sum(j=1, n, ispower(i+j) != 0)); \\ Michel Marcus, Oct 09 2017

Formula

a(n) ~ (2/3)*n^(3/2). - Robert G. Wilson v, Oct 10 2017
a(n) = Sum_{k=1..n} k*A075802(k+1) + Sum_{k=1..n-1} k*A075802(2*n-k+1). - Andrey Zabolotskiy, Oct 16 2017
a(n) = a(n-1) + 2*(i+n) is a perfect power for i=1..n, + 1 if 2n is a perfect power. - Robert G. Wilson v, Nov 23 2017

Extensions

a(31) onward from Robert G. Wilson v, Oct 09 2017

A292918 Let A_n be a square n X n matrix with entries A_n(i,j)=1 if i+j is prime, and A_n(i,j)=0 otherwise. Then a(n) counts the 1's in A_n.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 19, 23, 29, 37, 43, 51, 57, 63, 71, 81, 89, 97, 105, 113, 123, 135, 145, 157, 169, 181, 195, 209, 221, 235, 249, 263, 277, 293, 309, 327, 345, 363, 381, 401, 419, 439, 457, 475, 495, 515, 533, 551, 571, 591, 613, 637, 659, 683, 709, 735
Offset: 1

Author

Anthony Hernandez, Sep 26 2017

Keywords

Comments

Bertrand's postulate guarantees for every integer n the existence of at least one prime q with n < q < 2n. Equivalently, A(n) has at least one skew diagonal below the main skew diagonal whose entries will be equal to 1.

Examples

			         |1 1 0 1 0|
         |1 0 1 0 1|
   A_5 = |0 1 0 1 0| and so a(5) = 11.
         |1 0 1 0 0|
         |0 1 0 0 0|
		

Crossrefs

Programs

  • Magma
    sol:=[]; for n in [1..56] do k:=0; for i,j in [1..n] do if IsPrime(i+j) then k:=k+1; end if; end for; Append(~sol,k);end for; sol; // Marius A. Burtea, Aug 29 2019
    
  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=1, 1,
          a(n-1)+2*(pi(2*n-1)-pi(n)))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 29 2017
  • Mathematica
    A[n_] := Table[Boole[PrimeQ[i + j]], {i, 1, n}, {j, 1, n}]; a[n_] := Count[Flatten[A[n]], 1];
    (* or, after Alois P. Heinz (200 times faster): *)
    a[1] = 1; a[n_] := a[n] = a[n-1] + 2(PrimePi[2n-1] - PrimePi[n]);
    Array[a, 80] (* Jean-François Alcover, Sep 29 2017 *)
  • PARI
    first(n) = {my(res = vector(n), pn = 0, p2n1 = 1); res[1] = 1; for(i = 2, n,
    if(isprime(i), pn++); if(isprime(2*i-1), p2n1++); res[i] = res[i-1] + 2*(p2n1 - pn)); res} \\ David A. Corneth, Aug 31 2019
  • Python
    from sympy import primepi
    from sympy.core.cache import cacheit
    @cacheit
    def a(n): return 1 if n==1 else a(n - 1) + 2*(primepi(2*n - 1) - primepi(n))
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Dec 13 2017, after Alois P. Heinz
    

Formula

From Alois P. Heinz, Sep 29 2017: (Start)
a(n) = a(n-1) + 2 * (pi(2*n-1) - pi(n)) for n > 1, a(1) = 1.
a(n) = A069879(n) + 1 = 2*A071917(n) + 1. (End)
a(n) = Sum_{i=1..n} (pi(n+i) - pi(i)), where pi = A000720. - Ridouane Oudra, Aug 29 2019
a(n) = Sum_{p <= 2n+1, p prime} min(p-1, 2n+1-p). - Ridouane Oudra, Oct 30 2023

A276305 Primes p such that d(p*(2p+1)) = 12 where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

31, 37, 73, 103, 137, 139, 181, 193, 211, 269, 373, 433, 463, 541, 563, 571, 587, 733, 751, 859, 887, 929, 1021, 1129, 1151, 1381, 1399, 1489, 1637, 1723, 1993, 2053, 2083, 2087, 2237, 2521, 2621, 2731, 2837, 2843, 2909, 3109, 3137, 3209, 3271, 3313, 3323, 3343, 3541, 4091
Offset: 1

Author

Anthony Hernandez, Aug 29 2016

Keywords

Comments

Conjecture: this sequence is infinite.
Each number p * (2p + 1) is of the form p * q * r^2 but not of the form p * q^5. - David A. Corneth, Aug 30 2016

Examples

			Consider 31. Then 31*((2*31)+1) = 2*(31^2) + 31 = 1953 = 3*3*7*31 and d(1953) = 12.
		

Programs

  • Magma
    [n: n in [0..5000] | NumberOfDivisors(2*n+1) eq 6 and IsPrime(n)]; // Vincenzo Librandi, Aug 30 2016
  • Mathematica
    Select[Prime@ Range@ 576, DivisorSigma[0, # (2 # + 1)] == 12 &] (* Michael De Vlieger, Aug 30 2016 *)
  • PARI
    is(n) = ispseudoprime(n) && numdiv(n*(2*n+1))==12 \\ Felix Fröhlich, Aug 29 2016
    
  • PARI
    is(n)=numdiv(2*n+1)==6 && isprime(n) \\ Charles R Greathouse IV, Aug 29 2016
    

Extensions

More terms from Antti Karttunen, Aug 29 2016

A276307 Primes p such that d(p*(2p+1)) = 16 where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

67, 97, 127, 199, 227, 229, 241, 277, 307, 313, 331, 379, 397, 457, 467, 499, 547, 617, 619, 647, 709, 727, 739, 757, 773, 797, 823, 829, 857, 883, 977, 1033, 1069, 1093, 1117, 1123, 1171, 1187, 1193, 1201, 1277, 1297, 1303, 1319, 1423, 1447, 1459, 1471, 1483, 1609
Offset: 1

Author

Anthony Hernandez, Aug 29 2016

Keywords

Comments

Conjecture: this sequence is infinite.
Or, primes p such that d(2p+1)=8. - Zak Seidov, Sep 07 2016

Examples

			Consider 67. Then 67*(2*67+1) = 9045 and d(9045) = 16.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2000] | NumberOfDivisors(2*n+1) eq 8 and IsPrime(n)]; // Vincenzo Librandi, Aug 30 2016
  • Mathematica
    Select[Prime@ Range@ 256, DivisorSigma[0, # (2 # + 1)] == 16 &] (* Michael De Vlieger, Aug 30 2016 *)
  • PARI
    lista(nn) = forprime (p=2, nn, if (numdiv(p*(2*p+1)) == 16, print1(p, ", "))); \\ Michel Marcus, Aug 29 2016
    
  • PARI
    is(n)=numdiv(2*n+1)==8 && isprime(n) \\ Charles R Greathouse IV, Aug 29 2016
    

Extensions

Corrected and extended by Michel Marcus, Aug 29 2016

A276045 Primes p such that d(p*(2p+1)) = 8 where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

7, 13, 17, 19, 43, 47, 59, 61, 71, 79, 101, 107, 109, 149, 151, 163, 167, 197, 223, 257, 263, 271, 311, 317, 347, 349, 353, 383, 389, 401, 421, 439, 449, 461, 479, 503, 521, 523, 557, 569, 599, 601, 613, 631, 673, 677, 691, 701, 811, 821, 827, 839, 853, 863, 881, 919
Offset: 1

Author

Anthony Hernandez, Aug 17 2016

Keywords

Comments

Primes p such that 2p+1 is in A030513. - Robert Israel, Aug 17 2016
From Anthony Hernandez, Aug 29 2016: (Start)
Conjecture: this sequence is infinite.
It appears that the prime numbers in this sequence which have 7 for as final digit form the sequence A104164.
Conjecture: this sequence contains infinitely many twin primes. The first few twin primes in this sequence are 17,19,59,61,107,109,521,523,599,601,... (End)
From Bernard Schott, Apr 28 2020: (Start)
This sequence equals the union of {13} and A234095; proof by double inclusion:
-> 1st inclusion: {13} Union A234095 is included in A276045.
1) if p = 13, then 13*27 = 351 = 3^3 * 13, hence d(351) = 8 and 13 belongs to A276045.
2) if p is in A234095, then p*(2*p+1) = p*r*s (p,r,s primes) and d(p*r*s) = 8, hence p is in 276045.
-> 2nd inclusion: A276045 is included in {13} Union A234095.
If p is in A276095, then m=p*(2*p+1) has 8 divisors and there are only three possibilities: m = u*v*w, or m = u^3*v or m = u^7 with u, v, w are distinct primes.
1st case: if p*(2*p+1) = u*v*w then u=p, and 2p+1=v*w is semiprime; hence, p is in A234095 Union {13}.
2nd case: if p*(2p+1) = u^3*v then p=v and 2*p+1=u^3 ==> 2*p = u^3-1 = (u-1)*(u^2+u+1) with 2 and p are primes; then (u-1=2, u^2+u+1=p) so u=3, and p=3^2+3+1=13; hence p = 13 belongs to {13} Union A234095.
3rd case: p*(2p+1) = u^7 is impossible.
Conclusion: this sequence = {13} Union A234095. (End)

Examples

			d(7*(2*7+1))=d(105)=8 so 7 is a term.
		

Crossrefs

Equals {13} Union A234095.

Programs

  • Maple
    select(n -> isprime(n) and numtheory:-tau(n*(2*n+1))=8,
    [seq(i, i=3..1000, 2)]); # Robert Israel, Aug 17 2016
  • Mathematica
    Select[Prime@ Range@ 160, DivisorSigma[0, # (2 # + 1)] == 8 &] (* Michael De Vlieger, Aug 28 2016 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (numdiv(p*(2*p+1))==8, print1(p, ", "))); \\ Michel Marcus, Aug 17 2016