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: Dimitris Valianatos

Dimitris Valianatos's wiki page.

Dimitris Valianatos has authored 66 sequences. Here are the ten most recent ones:

A339480 Numbers of the form (k^2 - 2) / 2 where k - 1 and k + 1 are both odd composite numbers.

Original entry on oeis.org

337, 577, 1249, 1567, 2047, 2887, 3697, 4231, 4417, 6727, 6961, 7199, 7441, 7687, 8977, 10081, 10367, 10657, 11857, 12799, 14449, 15487, 16927, 17297, 17671, 20401, 20807, 21217, 21631, 22897, 23327, 23761, 24199, 27847, 29767, 30257, 30751, 32257, 33799, 35377, 37537, 40897
Offset: 1

Author

Dimitris Valianatos, Apr 24 2021

Keywords

Examples

			For k = 26, k - 1 = 25 and k + 1 = 27 are both odd composite numbers. So (26^2 - 2) / 2 = 337 is a term of the sequence.
		

Crossrefs

Programs

  • PARI
    k = 1; forcomposite(c = 1, 287, if(c%2 <> 0, if(c-k == 2, print1((c * (c - 2) - 1) / 2", ")); k = c))

Formula

a(n) = (A129820(2*n - 1) * A129820(2*n) - 1) / 2.

A342163 a(n) is the number of numbers greater than 1 and up to prime(n)^2 whose prime factors are all less than or equal to prime(n).

Original entry on oeis.org

2, 6, 15, 29, 60, 87, 137, 176, 247, 360, 422, 568, 689, 776, 923, 1136, 1369, 1494, 1764, 1978, 2128, 2451, 2710, 3074, 3562, 3870, 4077, 4411, 4638, 4995, 6026, 6426, 6987, 7271, 8180, 8493, 9134, 9802, 10319, 11030, 11767, 12139, 13314, 13712, 14329, 14742
Offset: 1

Author

Dimitris Valianatos, Mar 03 2021

Keywords

Examples

			For n=3, prime(3) = 5. Then the numbers up to 5^2 = 25 that have prime factors <= 5 are 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25. So a(3) = 15.
		

Crossrefs

Programs

  • Maple
    A[1]:= 2: p:= 2: P:= 1:
    f:= proc(n) local x,y;
      x:= n;
      do
        y:= igcd(x,P);
        x:= x/y;
        if x = 1 then return true fi;
        if y = 1 then return false fi
      od;
    end proc:
    for nn from 2 to 100 do
      q:= p; p:= nextprime(p); P:= P*q;
      A[nn]:= A[nn-1] + p + numboccur(true,map(f, [$q^2+1 .. p^2-1]))
    od:
    seq(A[i],i=1..100); # Robert Israel, Apr 06 2021
  • Mathematica
    Block[{nn = 46, w}, w = Array[FactorInteger[#][[All, 1]] &, Prime[nn]^2]; Table[-1 + Count[w[[1 ;; p^2]], ?(AllTrue[#, # <= p &] &)], {p, Prime@ Range@ nn}]] (* _Michael De Vlieger, Mar 13 2021 *)
  • PARI
    forprime(n = 2, prime(35), i = 0; for(k = 2, n^2, v = factor(k)~[1,]; if(vecmax(v) <= n, i++)); print1(i", "))
    
  • PARI
    a(n) = my(p=prime(n)); sum(k=2, p^2, vecmax(factor(k)[,1]) <= p); \\ Michel Marcus, Mar 03 2021

Formula

a(n) = A184677(n) - 1.

Extensions

Definition clarified by Robert Israel, Apr 06 2021

A339640 a(n) = (A062772(n) + A054270(n)) / 2 - A001248(n).

Original entry on oeis.org

0, 0, 1, 1, -1, 1, -1, 2, 3, 5, -1, 1, 0, 5, 1, 2, -1, 2, -1, 4, -1, -3, 2, 2, -1, 1, 1, 8, -4, 3, 4, 2, -4, 5, 10, -4, -4, -2, -1, 8, -1, -1, 5, -1, 3, -7, 4, 4, 1, 2, 1, 4, 5, 8, 8, 8, -1, 2, -4, -2, 3, 1, -8, -4, 1, -1, -4, 10, -2, 15, 8, 10, 2
Offset: 1

Author

Dimitris Valianatos, Dec 11 2020

Keywords

Comments

Conjecture: The partial sums of this sequence are greater than or equal to zero. This means that the squares of the prime numbers are smaller than the average of the previous and the next prime number most of the time.

Examples

			For n = 10 prime(10)^2 = 29^2 = 841. The previous prime of 841 is 839 and the next 853. The average of 839 and 853 is (839 + 853)/2 = 846. So a(10) = 846 - 841 = 5.
		

Crossrefs

Programs

  • Maple
    f:= p -> (nextprime(p^2) + prevprime(p^2))/2 - p^2:
    map(f, [seq(ithprime(i),i=1..100)]); # Robert Israel, Nov 24 2024
  • Mathematica
    Array[(Total@ NextPrime[#, {-1, 1}])/2 - # &[Prime[#]^2] &, 73] (* Michael De Vlieger, Dec 11 2020 *)
  • PARI
    forprime(n = 2, 370, print1((nextprime(n^2) + precprime(n^2)) / 2 - n^2", "))

Formula

a(n) = (nextprime(prime(n)^2) + precprime(prime(n)^2)) / 2 - prime(n)^2.

A335266 Numbers k such that b(n) = 2*b(n - 1) + k is prime, where b(0) = 1 and k is the smallest positive number.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 5, 11, 15, 7, 13, 7, 13, 31, 13, 9, 5, 21, 3, 21, 51, 17, 9, 39, 15, 3, 57, 27, 3, 15, 35, 11, 39, 55, 13, 27, 11, 35, 17, 11, 15, 13, 1, 13, 19, 75, 5, 23, 41, 9, 63, 63, 13, 25, 31, 21, 11, 9, 27, 11, 3, 31, 21, 35, 47, 33
Offset: 0

Author

Dimitris Valianatos, May 29 2020

Keywords

Comments

Sequence b, with an offset change, corresponds to A110930. - Rémy Sigrist, Jul 18 2020

Crossrefs

Programs

  • Mathematica
    b[0] = 1; b[n_] := b[n] = NextPrime[2*b[n - 1]]; Table[b[n] - 2*b[n - 1], {n, 1, 66}] (* Amiram Eldar, Aug 18 2020 *)
  • PARI
    b=1; for(n = 1, 66, b = 2 * b; p = nextprime(b + 1); k = p - b; b = p; print1(k", "))

A335139 a(n) = (prime(n + 1) +- k) / 2 where k is the smallest possible odd number such that a(n) is prime and a(n + 1) >= a(n).

Original entry on oeis.org

2, 3, 3, 5, 7, 7, 11, 11, 13, 17, 19, 19, 23, 23, 29, 29, 31, 31, 37, 37, 41, 41, 43, 47, 53, 53, 53, 53, 59, 61, 67, 67, 71, 73, 73, 79, 83, 83, 89, 89, 89, 97, 97, 97, 101, 107, 113, 113, 113, 113, 113, 127, 127, 127, 131, 137, 137, 139, 139, 139, 149
Offset: 1

Author

Dimitris Valianatos, May 24 2020

Keywords

Comments

The sequence of k's begins {1, 1, -1, -1, 1, -3, 3, -1, -3, 3, 1, -3, 3, -1, ...}. I conjecture that the partial sums of the k's sequence change sign infinitely often and that their absolute value is less than the square root of n.

Crossrefs

Cf. A000040.

Programs

  • PARI
    forprime(n = 3, 300, forstep(j = 1, 999, 2, a = (n + j)/2; b =(n - j)/2; if(isprime(a), print1(a", "); break); if(isprime(b), print1(b", "); break)))

A335135 Number of composite numbers between prime(n)^2 and prime(n + 1)^2 - 1.

Original entry on oeis.org

3, 11, 18, 57, 39, 98, 61, 141, 265, 104, 351, 268, 148, 314, 520, 594, 208, 678, 486, 258, 806, 573, 918, 1325, 703, 366, 753, 390, 788, 3006, 933, 1443, 503, 2581, 542, 1666, 1734, 1192, 1842, 1917, 644, 3364, 691, 1416, 717, 4457, 4729
Offset: 1

Author

Dimitris Valianatos, May 24 2020

Keywords

Examples

			For n = 1, prime(1) = 2 and prime(2) = 3. So the composite numbers between 2^2 = 4 and 3^2 - 1 = 9 - 1 = 8 are 4, 6, and 8, so a(1) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,q;
    p:= ithprime(n); q:= nextprime(p);
    q^2 - p^2 - numtheory:-pi(q^2)+numtheory:-pi(p^2)
    end proc:
    map(f, [$1..50]); # Robert Israel, Jun 24 2020
  • Mathematica
    Array[#1 - #2 - (PrimePi@ #1 - PrimePi@ #2) & @@ {Prime[# + 1]^2, Prime[#]^2} &, 47] (* Michael De Vlieger, May 24 2020 *)
  • PARI
    forprime(n = 2, 220, s = 0; forcomposite(k = n^2, nextprime(n + 1)^2 - 1, s++); print1(s", "))

Formula

a(n) = prime(n + 1)^2 - prime(n)^2 - (pi(prime(n + 1)^2) - pi(prime(n)^2)).
a(n) = A053683(n+1) - A053683(n). - Michel Marcus, Aug 27 2022

A334912 a(n) = numerator (2^(4*n-1) * (2^(4*n-2) - 1) * (Bernoulli(4*n-2) / (4*n-2)!) * ((2*n-2)! / Euler(2*n-2))^2).

Original entry on oeis.org

2, 16, 7936, 11184128, 209865342976, 2475749026562048, 123460740095103991808, 5779796046952399460368384, 3729407703720529571097509625856, 485491405392529556189699853976076288, 193817991886041515914007312001087567822848, 56920344782482721622150071084079041150980194304
Offset: 1

Author

Dimitris Valianatos, May 16 2020

Keywords

Comments

For every s odd power of odd prime number p applies: pi(p; 4, 3) = pi(p^s; 4, 3) and pi(p; 4, 1) = pi(p^s; 4, 1).
Product_{p = A002144} ((p^(2*n - 1) - 1) / (p^(2*n - 1) + 1)) = (2^(2*n) + 2) * (2*n - 2)! * (Pi^(2*n - 1) / zeta(2*n - 1)) * (zeta(4*n - 2) / Pi^(4*n - 2)) / abs(EulerE(2*n - 2)), n > 1.
Product_{p = A002145} ((p^(2*n - 1) + 1) / (p^(2*n - 1) - 1)) = (2^(2*n) - 2) * (2*n - 2)! * (zeta(2*n - 1) / Pi^(2*n - 1)) / abs(EulerE(2*n - 2)), n > 1.
Product_{p = A065091, m_p = (p mod 4) - 2} ((p^(2*n - 1) + 1) / (p^(2*n - 1) - 1))^m_p) = (2^(4*n - 1) * (2^(4*n - 2) - 1) * (BernoulliB(4*n - 2) / (4*n - 2)!) * ((2*n - 2)! / EulerE(2*n - 2))^2 ) = a(n) / A334835(n).

Crossrefs

Programs

  • Mathematica
    Numerator[Table[2^(4*s - 1) * (2^(4*s - 2) - 1) * BernoulliB[4*s - 2] * (2*s - 2)!^2 / (EulerE[2*s - 2]^2 * (4*s - 2)!), {s, 1, 15}]] (* or *) Numerator[Table[(1 - 1/2^(4*s - 2))*Zeta[4*s - 2]/DirichletBeta[2*s - 1]^2, {s, 1, 15}]] (* Vaclav Kotesovec, May 17 2020 *)
  • PARI
    E(n) = subst(bernpol(2*n+1), 'x, 1/4)*4^(2*n+1)*(-1)^(n+1)/(2*n+1); \\ see A000364
    a(n) = numerator((2^(4*n-1)*(2^(4*n-2)-1)*(bernfrac(4*n-2)/(4*n-2)!)*((2*n-2)!/ E(n-1))^2)); \\ Michel Marcus, May 17 2020

Formula

a(n) = numerator (Product_{p = A065091, m_p = (p mod 4) - 2} ((p^(2*n - 1) + 1) / (p^(2*n - 1) - 1))^m_p) = numerator (2^(4*n) - 4) * ((2*n - 2)! / EulerE(2*n - 2))^2 * (zeta(4*n - 2) / Pi^(4*n - 2))).
From Vaclav Kotesovec, May 17 2020: (Start)
a(n) / A334835(n) ~ 1 as n tends to infinity.
a(n) = numerator((1 - 1/2^(4*n-2)) * zeta(4*n-2) / DirichletBeta(2*n-1)^2). (End)

Extensions

More terms from Michel Marcus, May 17 2020

A334835 a(n) = denominator (2^(4*n-1) * (2^(4*n-2) - 1) * (Bernoulli(4*n-2) / (4*n-2)!) * ((2*n-2)! / Euler(2*n-2))^2 ).

Original entry on oeis.org

1, 15, 7875, 11174163, 209844223875, 2475721174255329, 123460585419481594375, 5779795241720954566935675, 3729407645972755442722659595875, 485491404557154927712860942825333525, 193817991848984690019014855170410665878125, 56920344781273501874745734859262004352327035925
Offset: 1

Author

Dimitris Valianatos, May 16 2020

Keywords

Comments

See A334912.

Crossrefs

Cf. A000040, A065091, A334912 (numerators).

Programs

  • Mathematica
    Denominator[Table[2^(4*s - 1) * (2^(4*s - 2) - 1) * BernoulliB[4*s - 2] * (2*s - 2)!^2 / (EulerE[2*s - 2]^2 * (4*s - 2)!), {s, 1, 15}]] (* or *) Denominator[Table[(1 - 1/2^(4*s - 2))*Zeta[4*s - 2]/DirichletBeta[2*s - 1]^2, {s, 1, 15}]] (* Vaclav Kotesovec, May 17 2020 *)
  • PARI
    E(n) = subst(bernpol(2*n+1), 'x, 1/4)*4^(2*n+1)*(-1)^(n+1)/(2*n+1); \\ see A000364
    a(n) = denominator((2^(4*n-1)*(2^(4*n-2)-1)*(bernfrac(4*n-2)/(4*n-2)!)*((2*n-2)!/ E(n-1))^2)); \\ Michel Marcus, May 17 2020

Formula

a(n) = denominator (Product_{p = A065091, m_p = (p mod 4) - 2} ((p^(2*n - 1) + 1) / (p^(2*n - 1) - 1))^m_p) = denominator (2^(4*n) - 4) * ((2*n - 2)! / EulerE(2*n - 2))^2 * (zeta(4*n - 2) / Pi^(4*n - 2)).
a(n) = denominator((1 - 1/2^(4*n-2)) * zeta(4*n-2) / DirichletBeta(2*n-1)^2). - Vaclav Kotesovec, May 17 2020

Extensions

More terms from Michel Marcus, May 17 2020

A331370 Decimal expansion of Sum_{(p1, p2) is twin prime pair} log(p2 / p1).

Original entry on oeis.org

1, 8, 7, 2, 1, 7, 8, 8
Offset: 1

Author

Dimitris Valianatos, May 03 2020

Keywords

Comments

This constant is the difference between Brun's constant and the A331369 constant.
This sum converges because log(p_(k+1)/p_k) < 1/p_k + 1/p_(k+1) for every k >= 1 and (p_k, p_(k+1)) twin prime pair.

Examples

			1.8721788...
		

Crossrefs

Formula

Equals A065421 - A331369.

A331369 Decimal expansion of Sum_{(p1, p2) is twin prime pair} 1/p1 + 1/p2 - log(p2/p1).

Original entry on oeis.org

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

Author

Dimitris Valianatos, May 03 2020

Keywords

Comments

Let (p_k, p_(k+1)) twin prime pair. Then log(p_(k+1)/p_k) < 1/p_k + 1/p_(k+1).
Lim_{k -> oo} 1/p_k + 1/p_(k+1) - log(p_(k+1)/p_k) = 0.
This constant is analogous to Euler-Mascheroni constant for twin primes.

Examples

			0.0299817108389062696826...
		

Crossrefs

Programs

  • PARI
    p = 3; st = 0.0; forprime(n = 5, 1e11, if(n - p == 2, st += 1/p + 1/n - log(n/p)); p = n); print(st)

Formula

Equals Sum_{k >= 1} 1/A001359(k) + 1/A006512(k) - log(A006512(k)/A001359(k)).